Total confusion turning to severe emotional crashing & flooding

Its been 3 weeks since D-day, I caught my wife texting with our good friend and she told me it was someone else. I chose to be calm and understanding and we spoke about the whole situation for a few hours. My loving wife told me everything: connection as friends for over 5 years, emotional connection for the past 2, 4 months ago things ramped up, 2 months ago they had sex in his truck, they have fallen in love. We have a good marriage, we are strong parents and our kids know we love them, we are a good team all around...except that I lost my own emotional connection and connection to her. I own that I have been distant, dismissive, and trying to give space where I thought space was required, but my actions have resulted in her feeling unwanted and undesired. The first couple days were unbelievable, the following week was learning what I was feeling, then the strangest thing happened: I started feeling connection to everything and everyone...it sounds ridiculous saying it, but started weeping while out of the house if I heard people that sounded like they were having a tough day. I really started listening to what my wife was saying and genuinely felt bad for her having to go thru what she is going thru. I haven't mentioned yet, she is still trying to decide if she wants to stay with me to give me a chance to be a good husband and keep our family together, or choose him once he gets his feet under him (me finding out forced him to tell his wife, they were close to divorce and now their house is listed, kids are aware of divorce, etc.). They are in love, no matter how bad this sounds I cannot ignore love, and if she chooses my will she always be resentful of what she might have had? I learned a new word: Limerance, but after 8 years of being friends I think she knows him well. I am now getting flooded with feelings of being alone, and ashamed, and unwanted...I am not sure what to do next, I do want to fight for my wife and family however I am not sure how to be the guy she wants while grieving. Any suggestions?