Eira you need to start being angry about how he is treating you. I had to hit rock bottom (several times) before I could start my healing process and part of that was being angry at how I had let others (including past partners) treat me.
When you learn about the psychology of abuse, you can then see how none of it is a reflection on you (e.g. I told myself there was something wrong with me, I wasnt good enough, I deserved to be treated badly etc.) and you start to accept that it is ALL them. They project their bad qualities onto you and then you start to take them on as your own, but they were never yours to begin with. This should make you very angry and realise how futile it is to try and fit what someone else wants you to be (in an abusive relationship the rules always change anyway so you will never win). People have to earn the right to be in your life by treating you with respect and fairness.
Start by protecting yourself first and foremost from this back and forth bullshit. Treat yourself how you would want your friend to be treated. If he left the family home then he loses the privilege of what the relationship brought (sex, comfort, money, advice) whatever it is that you gave him. Only talk to him about the kids and practical stuff and keep conversations short and to the point. Dont respond to any questions he asks that are outside of these topics. He hasnt treated you like a friend so dont be one to him.
This will be hard, it will at times be very painful but all personal growth will come with pain as you work through it. Fight the urge to go back to destructive patterns, if not for yourself at first, then for the children. They deserve stability which you are perfectly capable of providing alone.
Stay single for at least a year as it is difficult to recover whilst in another relationship (I know the urge will be strong to be with someone but you have to fight it). I promise in a year you will look back and be proud that you walked away from this toxic situation.
Remember, a codependent is also an enabler and there are so many stories on here where people have cut contact with the non abusive parent because they enabled the abuse. You dont want to lose your future relationship with your children over this man.