getting over my ex

im seriously having such a hard time getting over my ex. we dated for about a year, and when the break up happened it was the hardest thing ever for me. it took me a while, but eventually i started to feel better. I was doing absolutely fine up until last night and now all the feelings are coming right back again. we broke up almost 2 months ago, and even though i know that he’s not a good person for me to be with i still get extremely depressed over him. i just don’t know what to do, if any of you have ever been through a break up before how did you handle it and get over it?