"It's better to have loved and lost than to have never loved at all."
I just got out of a two and half year relationship back in June and it's been really difficult for me. I needed to get out of the relationship but that doesn't change the fact that I miss it a lot.
Sometimes, it's really difficult to deal with this kind of pain. I think optimism and positive thinking really makes a big difference. If you are being pessimistic, honestly, nothing will get better. You need to try your best to look at the positive side of things.
Hanging out with close friends and looking to your friends and family for support is a really good coping mechanism for this type of situation. I know it's easier said than done but you need to crawl before you can walk.
In this type of situation, you really need to take things one day at a time and look for the positive side of even the most negative situation. Even the most negative situations are learning experiences.