Well, factors are time, and lots of it. Damage done to a marriage takes as long to fix; being prepared to see it through.
Cutting off from bad behaviour (ie, withdrawing from him etc) and encouraging good behaviour by being positive towards him etc. This also helps me as well as the sitch. This is a way of damanding respect without actually verbally demanding anything, because he gets to realise that I just don't want to know if he is hostile towards me.
In my case, also cessation of depression and cessation of court action helped us to get along with each other (there was no chance while all that was going on) and definitely increased PMA no matter what the circumstance, makes me someone he wants to be around, and makes me more content in myself.