Try to figure out what you truly like to do in life and take some steps to achieve it.
Sounds EXTREMELY hard to do when you're in your current mental state, but try. Really try. Basically, do productive/fun things for yourself to keep your mind off of the pain and then at night focus on the problems that occurred in your relationship, think about what you could have done better and then think of nothing and let yourself go to sleep. If you need to cry, go ahead... you're no less of a man if you do cry. Let the pain slowly fade away and you'll start to feel better about your steps towards being productive. I don't necessarily mean being productive by getting a job or whatever but do something (research, art, exercise, etc) to pass the time and also increase your skills. You may not completely heal BUT you will have possibly found a new hobby to keep yourself entertained and healthy. You may even attract someone that notices your skills and will like you for them, and can go on from there.
I know my advice sounds like one of those stupid inspirational drama movies, but sometimes it actually works o.o