Breakups are not the absolute end
A breakup is a devastating event which can leave you emotionally wounded. You know that things can be made to work and you are now trying to figure out "how to get back my ex?" Breakups are not irreparable events which are the absolute end of things. There are things that you can learn and use to try an get your ex back, but it will take work and time.
Let go of all of the pain
First, you have to let go of all of the pain and move on. This is a difficult step, but you should instead try and think about the fact that letting go will bring them closer to you. This is not to say that you should shut everything out. You need to experience these feelings in order to move on, but you cannot spend too much time on them, otherwise you will hinder your own progress. Tell yourself that moving on is how to get my love back and it will be easier to do so.