Stop thinking of the good times with your ex, and think of the bad times. It will help you forget him. There is a reason why you two broke up, right? It's because there were more bad times than good times, right? Also, don't ever contact your ex, and destroy all pictures of him. Then give it time. It just takes time.
I have a long time interest in psychology, specializing in relationship dynamics for 30 years.
(Please note, we give the best advice we can based on the information given in a post. For better advice, please include the age of all romantic partners.)