When I got a divorce my x decided he wanted to keep the house. I didn't care, that was fine with me. I live in a community property state and I knew I was entitled to half of the equity. He refinanced the house in his name alone and I signed over a quit claim deed. The title company then gave me a check for one-half of the equity minus costs. I was a happy camper. I was then able to put that money down on a nicer house in a nicer neighborhood far enough away from him.
That's exactly what needs to happen in your case. Well, you don't have to buy another house. You can do what you want to with the money.