I don't know if this is a consolation to you. I know quite a few couples whose marriages are also not going well. It is obvious to me their relationships have been broken for a long time. But somehow both husband and wife choose to drag the relationship along and torment each other mentally. Why do they make such choice is totally beyond me.
I am blessed when it comes to relationship management. I will terminate a relationship quickly as soon as I get a sense, even it is a tingling sense, that it may not work out.
We all make mistake. Just don't drag on a mistake. I am actually happy for you that you had divorced her. Hope you have learned a valuable lesson from this and won't make the same mistake again.