Been there, done that, bought the t-shirt. During the breakup, I thought the world would end and I was miserable. I then found wife #2 after 4 months of feeling sorry for myself and have been ecstatic every since. I was so busy watching the door that just closed on me that I was not seeing the one that opened for me. Best thing I can tell you is look forward, not back. If you have kids, take care of them best you can and start looking for a new mate, if you are worth you salt, there are plenty out there.
I also can’t begin to tell you the satisfaction I got when my son told me the ex had admitted to a friend that she had screwed up losing me. I look at her now and then my current wife and just smile.