There are two issues here - the short term and the long term.
In the short term if your ex has used or threatened violence against you then you can apply for a n Occupation Order allowing you to live in the matrimonial home and forcing him to leave
You can read more here
This will ensure that you and the children are adequately housed for now.
The long term issue is about where you will live in the future
The starting point for division of the assets is 50/50 - although the parental gift may be disregarded.
However the priority is the safe and secure housing of the children until they are 18 - and if that means you need more of the capital until then then that is what will happen
If Contracts have actually been exchanged then if the sale and purchase do not go through there will be serious financial consequences.
If that is the case then for a period at least you will have to remain in the property(without your ex) and the issue will be how much maintenance your ex will have to pay to ensure that
the mortgage is paid.
As soon as it is feasible the property could be sold which will allow you to purchase a cheaper property with a significantly smaller mortgage
I hope that this is of assistance - please ask if you need further details