You need some space so that you can decide what you want to do without being hounded by him. Tell him by email (emails can be used as legal documents, are time and date stamped and can be used to keep a paper trail), that you are blocking him from your phone, that you need space to think, that he should only contact you by email. You may feel that opening an email account just for communication between him and you will put a firm boundary around things (he is likely to bombard you with communication and this way you can read them or not when you want to). You should be able to block him from your normal email accounts.
Go and speak to as many solicitors as you can in your area, many give a free half an hour advise. Have a clear list of all questions you wish to ask. You need to spend a bit of time finding one that you feel comfortable with.
Make sure that you have the childrens passports stashed away safely. The advise about bank accounts that other poster have said is very sound, this man is no longer your friend, you can not trust him.
Log things with dc school and your gp, the school will need to know so that they can help support the dc. Logging things with gp will help with the paper trail and you may need help if you can't sleep, are stressed etc. you may find that at some point counselling may be benificial and your gp can refer you.
Keep copies or originals of all of your important documents, dc birth certificates, finances, etc in a safe place away from him, a good and trusted friend may help. Take photos of all documents and email them to yourself.
Find out what help you can get financially, eg single persons council tax, benefits, tax credits, etc. CAB may help you find out more on this.
Make sure that you have some easy to have nutrition for example soups and smoothies for the times you may not be able to face eating, you need to keep your strength up. Multi vits and minerals will help too. Teas such as night time tea, valerian etc may help you to keep stress levels down, scull-cap is good for anxiety. But always check to see if you are on any meds that you can drink/take these.
Seek rl support, you will need it.
Be kind to yourself, try to do relaxing things, walking, reading, soaking in a lavender bath.
Have a look at the berevement process as you are very likely to go through this and it will help you understand your emotions.
Be aware of things like hysterical bonding, the cheaters script, etc, again this will help you to understand what is going on and how to avoid pitfalls.
A good rule is to give yourself 24 hours to reply (if at all) to any (hopefully only email) communication from him. You do not dance to his tune, you have all the time in the world to reply. Also this 'rule' will help you to not react emotionally but to act in a cool, calm and collective manner.
It may be worth 'losing' your house key and getting the locks changed, so that he doesn't just walk in when he wants too at any old time of day or night.
I hope that you will be ok, (((hug)))