If you don't want to leave (because that's YOUR choice and no one can tell you when you're ready to leave), then you pull back SIGNIFICANTLY.
By that I mean you stop doing EVERYTHING and start acting like just a friend to him. This will help to
a) possibly show him that you're not playing games and you're not going to tolerate his B.S. anymore. However, you can't pull back, show him you are not going to deal with him in that manner anymore, and then go back to the same behavior you were doing before.
Remember: Insanity is doing the same thing over and over again and expecting a different result.
b) help you gain distance from him to give you the strength to finally leave (if that's what you're planning on doing).
People can only change if they want to change. The only thing that YOU can change is your behavior and how you want to deal with the situation (if you choose to stay and still continue to deal with him).