When my best friend married her ex husband, she changed from being confident outgoing to a shell of her former self, he owned his own business (which she basically ran for him) he looked succesful, they had the kids, house, cars etc but I knew deep down she was not happy.
She found out about his affair (his words later, when confronted with proof he had upgraded and deserved to be happy, she could still work in the business and he would get her a little place for her and the kids) Unbeknown to him she had known for 6 months (how she kept it together I will never know) she made plans got an excellent solicitor and planned what could only be descirbed as a military operation to protect herself and the kids.
He never saw this coming, she also set up a rival business to his and a lot of clients left to go with her (he still did not catch on to this at the time to involved with his trade up to care about the business)
He was literally flabbergasted with the judges financial order, as was the OW, who had taken great pleasure in telling her how her life of luxury would be over and hers was just beginning!!
After the divorce she actually broke down all the fight was gone, but still put on a brave face, and has now recovered and loves her new business, her freedom and has now 5 years later got a new partner and is so happy.
OW left him after 6 months because he did not provide what he stated he would
house being sold business not doing well. She actually occasionally feels sorry for him and once thaked him for giving her life back.
So yes this one did work out for the better for my friend but the hurt and damage often remain hidden and don't always work out for the best.
If you no longer love someone or want to be with them, surely its better just to say so and walk away rather than have an affair causing trauma for everyone around you, because other friends affairs have shown me this is not the normal outcome and I have seen some really broken friends both male and female due to this.