Wow that's a major development. It sounds like you handled it perfectly. That'll be great for your wife to get professional help. There does seem to be an underlying sense of depression and emptiness in these wayward spouses that should be treatable.
I watched a TEDx on YouTube titled "Rethinking Infidelity: For anyone who has ever loved" by Esther Perel. This might be a helpful video for you to watch at this time given that it seems your wife could come back to you and yet there's this OM in the picture still. Esther Perel says that recovery starts when there's an apology - did your wife apologize last night? Did she seem concerned about your welfare or just her own?