Forgive me for contradicting you here. To me the marriage WAS a failure...but not at your end. He basically shat upon it. You did everything you were supposed to do...and he did everything that narcissistic self-centered a-hole men do to get what they want and control the women around them.
The marriage failed because HE failed to be a proper husband to you.
You've got half of it right, tho. Yes, the divorce needed to happen. Celebrate getting that heavy duty selfish bore off your back. You are best rid of him. It sounds like you are getting your life back together in a good way, and you are doing your best on behalf of the children.