My mom has bipolar disorder. She had her first nervous breakdown when I was thirteen. Dad stayed until we were all grown (in the seventies, even with her incapacity, dad would have had trouble getting custody). Every couple of years, mom would hit another bad spot. With us kids grown and mom recovered from her latest hospital visit, he left.
Best thing he ever did.
Mom was furious. And bitter. Being the dependent end of a co-dependent relationship, she was convinced he would NEVER LEAVE HER. She wished him death. Tried to recruit us kids to her side. It has been over 10 years, and she has mellowed a lot. Dad blossomed and found a vivacious, energetic, independent woman. And married her, the smart man.
I am so proud of my dad for taking the moral high road, even if my mom would never acknowledge it as such. By the way, he was generous in the divorce settlement. Generous, but not stupid.
Food for thought, if it ever gets to be too much.