I am so sorry to hear this, I can imagine it was heartbreaking for you and so stressful to try to constantly live up to nearly impossible expectations. I too, had a long-term relationship with a person with a a serious mental illness (schizophrenia)
I vacillated between deep compassion and excessive frustration and the breakup was very painful as well. I felt guilt for some time, thinking I was abandoning him.
It’s my understanding for those who suffer with obsessive-compulsive disorder, they literally cannot help it. A portion of their brain turns on, dictates these types of control mechanisms and it runs the show. Even with medication and cognitive behavioral therapy, they may struggle to function within relationships, hold a career, or in their family system.
I hope at sometimes during your healing process, you will open to the idea that there was nothing you could have done differently to change the outcome. As a matter of fact, it sounds like you went above and beyond. His not choosing to stay in the relationship was not about whether you were a compatible or worthy partner, but simply the unfortunate consequences (for both of you) of his mental illness.