Getting over a very toxic boy

Help please!!! I am in love with my ex but he is so toxic and he lies constantly and just makes me feel like shit all the time and I know I shouldn't still allow him to be in my life still but I can't help it because we're so close :( but he is killing me 
Please please please give me tips I can't do this anymore
I need to stop loving him and giving him chances but I don't know how