Give yourself time to breathe. This is all very new to you, and you have gone from having a bomb dropped on your world to being bombarded with a ton of advice.
It is a lot to take in, so give yourself time to calm down, and do not rush into any decisions. And that includes making any promises to your wife about reconciliation or second tries at the marriage. Make no commitments, and make it clear that it is going to take you some time to figure out whether you want to remain married to your wife.
Your wife needs to go through the process of accepting that she may lose everything that she had for her to rediscover its value. It sounds like she came to take all the good things she had for granted, and got complacent. That complacency became boredom, then resentment, and she became easy pickings for any passing opportunist who could spot a mid-life crisis Mom.
Her affair was nothing to do with you, so forget about examining what you might have done wrong, or not done enough of. In some ways, the problem is more likely that you did too much, gave too much too easily, to the point where it was all taken for granted.
What mattered to your wife about her affair partner was not that he was in any way 'better' than you, but that he was a 'new' man, and someone other than you.
Many years ago I asked a long-term girlfriend why she liked to get compliments from other men when I used to pay her compliments regularly and did my best to make her feel loved and special. She replied, "You're my boyfriend. You have to say that stuff. Some other man doesn't have to, so when one does, it is something special".
Can you see the way that mentality works? Compliments and good treatment from a husband or boyfriend matter less than a compliment from some random opportunist who wants to get into their pants because the husband or boyfriend "has" - get that entitlement HAS - to be nice, so what husbands and boyfriends do is diminished in value.
At the time, I thought, "Why the Hell do you think I HAVE to do or say anything nice? I do it because I feel like doing it, not because it is a contractual obligation. And if you take it so much for granted, how about I stop doing it?" And of course, while I thought that, I never said it, but I really wish that I had.
As for all the tears and histrionics from your wife, be careful about how you interpret them.
They might be 100% genuine, and 100% remorseful about how badly she has abused you, your love, and your trust. Or they could be for herself, because she realizes how much she stands to lose if her motel-based second relationship costs her everything the two of you have built up over the past two decades.
I will never forget the same long-term girlfriend revealing something in a discussion about an argument with a former boyfriend that stunned me. She had done something to upset the guy, and she described the things she had done to try and get herself out of trouble. She said that she had apologized profusely, said that she would never do something like that again, and "...I tried crying, but that didn't work".
When she said that, I stopped her, and said something like, "What do you mean, you 'tried' crying? Like it wasn't what you felt, but you thought it might get you out of trouble?"
"Well, yes", came the reply.
I felt totally lost. I am sure I am not the only man for whom women's tears are like Kryptonite. You might be the most badly-wronged man in history, but if the woman who wronged you starts crying, all your resolve and anger melts away. It disarms us.
The way to tell if you are being emotionally manipulated is by staying as neutral as you can, and observing the actions that show the way a person really feels. Forget the words. Forget the tears. Actions are the most revealing indicator of a person's true motivations.
I actually offered her a 50/50 split that night, no fuss. So fear of being poor or having a hard time wasn't a consideration and she could have supported that asshat if she wanted to.
I am saying this as a fellow betrayed man, and accompanied by a bro-hug, but please stop being such a push-over that invites being taken for granted. Stop being Mr. Decency, Captain Fair Shares, and Johnny Permanent-Shoulder-to-Cry-On. Seriously, you want to offer her a deal that lets her support the worthless opportunist that used her for free sex and disrespected you? Who benefits from that? Why would you do that?
Please, my friend, understand that it is not, and never has been, any more of a privilege for you to be with your wife than it was a privilege for her to be with you.
She also facebook texted a friend she was confiding in, in which I DID read their entire history. Her friend was encouraging her to divorce, the crap coming from that persons messages was infuriating, like she was cheering my wife on, the last text from my wife to her was "We are back together and going to work it out, you should have helped me with this". Her several "I'm sorry" responses have yet to be responded to.
You later wrote that you are not going to 'force' your wife to break contact with that friend, but you know what? You should. Make your wife choose between you and that awful, toxic friend.
The process will be a revealing demonstration of where your wife's loyalties lie. And do not worry about revealing that you know about those exchanges; it will benefit you to make your wife feel like all her digital exchanges may have been seen by you. Let her worry; it may influence how much she tells you.
If you want to remain with your wife, and re-boot a second version of the marriage, it has to be one where your wife no longer takes you and whatever good things you do for granted, as if she is entitled to them.
And for yourself, take a step backwards and consider what you want and need in future.