Here's some good and bad news. The bad news is.. you can't verbally convince your wife to do anything. The good news is.. you can take action to be the person you're meant to be.
The deterioration of a marriage takes two. Taking 100% accountability for your 50% starts moving you along in the right direction. Remove the negatives.. in my case the messy house frustrated him. The less the disenchanted spouse has to gripe about, the more they are forced to see the real picture.
A great book to read is "Not Just Friends" which gives the perspective of each individual in an affair.. the betrayed spouse, the wayward spouse and the other partner. It's a great read and something I found incredibly helpful.
Your wife is unhappy and angry. The online relationship was an outlet, a symptom. You can't fix her, but you can listen. That means listening without talking, without interjecting, without ego. It's amazing what you hear when you simply listen. The more you listen, the greater your silence, the more she can say. It's a difficult thing to learn but reaps vast rewards. As she talks nod.. "I can see how you feel that way." (validation).. make encouraging noises. In these conversations it's not about you, it's about her.
Last but never least is caring for the children. They know when something is off and need the reassurance that their parents are there for them. Give them your time. Let them know you're not going anywhere. Be their dad.
Focus on you, how to improve for you and the rest will follow.