What Suzi said. But, most important, tell yourself that you do not need to be with anyone to be complete. Spend some serious time getting to know yourself.
My first wife cheated on me for two years and left me for the other guy, and yes it was devastating at the time. Unlike your wife, she wanted to be a frenemy rather than a friend. I thought she was just going to leave, but she circled back around and stayed around to make trouble. I spent two years single after that, just spending time trying to figure myself out, and in some ways, it was the best two years of my life.
So count yourself lucky that your (soon to be) ex wants to still be friends. Spend a lot of time on a trip of self discovery, and make it your trip. Most important, make friends with people. Join clubs, do volunteer work. You need to build a new support system around yourself, and you need to do it as yourself, not as half of a couple.
And whatever you do, totally discard the possibility of any future romantic involvement with your ex. You will only sabotage yourself and give yourself pain. If it ever happens, wonderful, but if you depend on it, you poison yourself.
Become yourself, make lots of friends, and you will find what you are looking for -- but you will find that it was deep inside you all along, not in a relationship with anyone else.