By knowing that there is a light at the end of the tunnel and by knowing that you are far more than just a participant of a failed relationship.
It won't be easy, my friend, I have been there and survived, though I often thought otherwise.
I turned to Christ for comfort, support, and guidance, and He delivered. I also sought the company of some trusted allies who helped to strengthen me.
Allow time to mend your broken heart and heal your wounds. Just know that, given time, you will recover and be off to better things and be able to dive back into life once again.
The reason you feel so much pain is that you allowed another person access to your heart. You allowed yourself to become vulnerable and allowed yourself to trust another. These are just some of the side-effects of love. These are good qualities to have, my friend, a true sign of inner strength.
In a little while, the sun will shine again. Just wait...and you will see.