My ex turned out to be gay. So no real option but to divorce (although it's surprising how many people try to cling on in that situation, including me).
He had been in denial about his sexuality. I had been in denial about the quality of the relationship. We were together twenty years, but there was a lack of affection on his side, lots of criticism that I told myself wasn't criticism, quite a few low-level controlling behaviours from him. I put a lot of it down to him trying to control himself, and that controlling behaviour then spreading to other areas.
Anyway, we had relationship counselling and I would recommend it as a first step if you think there's something worth saving. We all have our faults and I learned a lot from having counselling. Ultimately, though, I was never going to have a good marriage with a man who couldn't return my love because I was a woman.
I am much happier now and in a new relationship, but would far rather be single than in another dissatisfying/dysfunctional relationship.
On the other hand, it's very hard financially. Much tougher on a single income. I miss the DC when they're with their dad. I don't have the family life I signed up to. And the divorce process was gruelling. The most apparently reasonable people become completely unreasonable over the division of assets.