I'm sorry to hear that things did not work out for you.
I seem to recall you were in a "long distance relationship."
Reality dicates these are bound to have a set of challenges beyond normal relationships. In order for things to progress eventually one person must be willing to move. You also have to deal with having to "make up" after arugments via emails, texts, and phone calls instead of being able to kiss and hold one another. Long distance relationships also make it easy to give into "temptation" when one is feeling bored.
Having said all of this there is only one way to deal with a heartache. You have to accept the relationship is over. Focus on other areas in life which bring you happiness, spend time with family and friends. Eventually you will be ready to date again. (Hopefully someone in your own town). It takes more courage to fall in love a 2nd or 3rd time than it does the first time. If it's of any comfort to you most people have a number of failed relationships before they "get it right". Below is a recent hub I wrote dealing with break ups. I wish you the best!