Although you could have been much smarter in handling the situation, don't blame yourself for a failed marriage. That is of course if your account of the situation is accurate. If she was just that hard to live with, then it was HER that killed the marriage.
I have family that went through similar circumstances. It was obvious that a particular individual made their spouse's life a living hell for many years. The victim endured relentless torture quietly and with dignity as toddlers grew to teenagers. Then, the victim made an escape to happiness. Today, that individual is much happier and healthier. The perpetrator remains bitter even years after the divorce.
This is the awful reality that can come about when a truly altruistic lover of some sick person sacrifices his/herself in hopes that all will work out in the end.
My advice? Don't let fear of anything, not even hell or God, and especially not any social circumstances, prevent you from being yourself using your own reason in determining your actions.