Unfortunately, that is not possible. You have 3 options:
Take over mortgage
One partner stays in the house and takes over the mortgage. The other is bought out if there is equity. Can't you agree on who takes over the house and the mortgage? Then engage a mediator. They can help you make a decision.
Sell house
Can't you reach an agreement even with a mediator? Then you sell the house, pay off the mortgage with the proceeds, and divide the equity (or remaining debt).
Leaving the house undivided
Some ex-partners choose to remain joint owners of the house. However, a good relationship and clear agreements are crucial to prevent trouble between you in the future.