I'm not used to talk about topics which are highly present on the web, but I feel like I can offer an alternative approach on this one
Do you know Anki ? This is a software which has popularized the spaced repetition learning technique. The principle of this technique is that when you memorize something, you will forget it after X days unless you memorize it again, and the second time you will remember it for Y days with Y much greater than X. This is easy to understand, the more you think about something the longer you will remember it.
Well the same thing happen when you want to get over your ex, you want (most of the time) to stop thinking about her/his (will use his in the following). So to be able to do that you need to do two things :
Take the decision that you want to get over him (usually the most difficult part)
Take actions to get over him
To do 2. you need to do 1. before. But the issue is that 1. is almost impossible to do rationnaly because anyone will try to balance what she has to gain and what she has to lost, and usually in the lossing part there is the fact that you will loose your ex, something that you don't want. So the best way to do 1. is to do it when you are not lucid. You can be drunk, it can be just after you learn something huge, it can be immediately after the breakup, but it will be always easier to be in that state of mind after these kind of events.
Then when you are in that state, you will be able to take actions to get over him, here is the list of things that you absolutely have to do :
Tell him that this is really over for you, and you are going to block him on everything and that there is no future between you and him at all, you are not angry against him, you are just trying to remove him from your life
Block him on all social media, as long as you follow him on social media the spaced repetition thing is going to prevent him to forget about him, social medial will remind you of his existence all the time
If you have pictures of him, video, facts anything about him on your phone, I won't tell you to remove everything as this is very difficult to do, but gather all the pieces and put it on an external drive or a computer you dont use, put everything somewhere that is not easy for you to access. You will still have everything but you will forget about it
If you make all those steps you have make a huge step forward, if you have a little bit of ego you will prevent yourself to try to contact him again or try to get info about him because you commited yourself to not do it. But this won't fix everything. There are two other things that you need to do over time:
Talk or write about everything of your relation with him, do it accurately, and go deeply in your mind. Do it until you have nothing new to say, you can do it several times, but try to say everything that can be said about it. You need to purge your mind with things that you kept secret and you kept close to you. The more things you keep for yourself the more you will get flashes of those subjects and therefore, him. Write down all the bad things of your relationship, put everything on a paper, there are several billions of people on the planet if you found a person like that, there are for sure many others who are better...
Built new habits. This person was part of your life, a part of your days was dedicated to him, you need to fill this time with something else. If you used to get coffee with him everyday at 11pm, then try to do something new every day around the same time. The more free time you have that are associated with time you were doing things together the more your memory will remind you him. You were going to the same park every saterday with him ? go to another park every saturday or go for a hike somewhere else. There are things you can't trick, if you had a cat with him, if you were planning to get married together,.. your memory will remind you all of that, that's normal, just think about it and then go to something else
The longer you have been happy with this person the longer the recovery is going to be. But if you follow the steps you should be on a fast track to forget about him