Concentrate on yourself. Unless you think that you are part of him, or he is part of you, you are a separate entity. What do you do that makes you happy. What do you do that fulfills you. What do you do that increases your level of self respect? What are you doing, today, to make your future better?
If you have answers for these questions, then do those things more and more, until there isn't a space for him in your mind. If you don't have answers for them, get some answers.
And you can train your brain, simply, to give up thinking about something, just like you can train it to give up smoking or make it build a habit of going to the gym. I trained my brain to not obsess over an ex years ago by catching it every time it started thinking of them, and immediately starting to sing the Postman Pat theme tune. To start with, Postman Pat lasted about 4 seconds each time, and as soon as I took my concentration off it, my mind would go back to the ex. But after a bit, it got better and better. I will add that, once you've picked your tune-of-distraction, it's perfectly ok to just sing it inside your head.
Your life is about you. It's not about him, or you-and-him. You need to move your focus. Probably when you try, you'll find that something in you is reluctant, and doesn't actually want to let go of your relationship with him. It's a horrible feeling, when you realise that you like your addiction. You like the thing that's damaging you. You want to keep it. But that's the feeling you want to investigate; why do you (and it's nothing to do with him) want to hang onto something damaging? It'll be because part of you doesn't accept that he's damaging, despite the fact that he makes you feel bad, and that's a lack of self validation. Focus then on how shit he is, and how pissed off with him you are, and believe in those feelings. They are the power that will keep you away from him. But it's about you and your feelings, not the things he did to make you feel that way. It's all about YOU.