I'm right there with you, hun.
My ex pulled some messed up stunts and even now when I'm aware of him and his games I can't help but feel like I need him.
I tried to remain friends too but in the end the greatest amount of healing has come from cutting him from my life.
If that's an option for you maybe you should take it into consideration.