Forgetting your ex is not easy at all but nothing is impossible. First, you need to get rid of all that reminds you of your ex. Get rid of their contacts, their belongings in your possessions, block them on all social media platforms, stop going to places you use to host with your ex.
Get a new hobby, do something new or spend more time on something you really like, this will help spend less time thinking of your ex.
Do not spend too much time alone, spend more time with your friend or family. Over time, you will get over your ex.
Getting over a relationship is hard. However, if you think wisely you can get over your ex. First, you need to get rid of the memories that keep reminding you of him or her. Then you need to install a change in your life. Get a dog or perhaps a new haircut. Just do something different to set you apart from your past.
You also need to make yourself busy to minimize the time spent remembering your ex. You should also spend more time with your friends as they can help you get closure and distract you from diving into a spiral of thoughts that will make you miss him or her more.