The union between a man and a woman is not something just physical. Mental and psychological factors are also deeply involved in such a relationship. As such, when there is a breakup, both parties might feel that they would like to get their ex back. Still, if you ask the question of how to stop wanting my ex back, the answer is somewhat simple, though the process is tough. Because you feel terribly lonely after the breakup, it is natural that you want the ex to be back in your life to fill up the void. Still, the first thing that you should do is to ask the question whether you really want your ex back or is it just the loneliness and the frustration that is making you feel like this.
Think twice whether going back would be worth it. There would definitely be several strong reasons why both of you parted ways. Those reasons are not going to vanish when you start another relationship together. Analyze those reasons. Find out which problems could be sorted out amicably and which could never be compromised. If the reasons that could be sorted out are in majority, then there would be some point in trying to want your ex back. Otherwise, when the points that could not be compromised are more, your effort in thinking of how to stop wanting my ex back would take priority.
The reasons for following the process of how to stop wanting my ex back are basic. You already have a soured relationship on your hands. By coming together again when both of you are truly not compatible, you would only aggravate it, instead of starting a new chapter. You should think this over logically and not emotionally. Then only you would be able to take the right decision as to whether you want your ex back or you want to forget your ex.