I'm sure this is one of the most painful things you've ever experienced. Do not waste that pain! Use it as a catalyst to improve yourself. Humans don't learn very well when they're happy and comfortable. It's when everything falls apart that they find out what they're made of. I'm actually somewhat grateful for my WAW sitch, because out of it I've found new strength and focus. I'm a 10x better man now than I was 6 months ago, and you will be too.
^^This.
Don't give up all your hope things may work out, nothing is ever hopeless. It may seem like it is right now but you never know what the future will hold. There's a lot of wonderful advice on here that people can give you, you just have to be patient.
Accept what is, let go of what was, and have faith in what will be