I think the phrase amongst intelligent criminal types that springs to mind is that
"You NEVER ever shit on your own door step".
Your partner has blown that one right out the water and then some. Get yourself and your kids someplace safe and then break down, cry, scream, sob your heart out. This betrayal is far worse than mere infidelity and I get that you must be feeling absolutely devastated. Right now though naievity is a luxury you cannot afford and you don't have time for a breakdown.
There are lots of people out there who can help you, from family and friends to this forum, right through to the official authorities. They can't help though if you are unwilling to make that first, admittedly very scary step for yourself.
Whatever you do, don't blame yourself for the incredibly stupid and dangerous actions of a grown, well educated adult - your ex partner is soley responsible for the breakdown of your family unit and for putting the children at risk. (& he is your ex because mentally he's already checked out of the relationship and sold his family out to the addiction). Go now and SS will help you sort out the practicalities later if you cannot bring yourself to share with your social circle. (to be fair to them, this is exactly the sort of situation where SW's prove to be worth their weight in gold).
You can only take responsibility for your own actions from this point forward. Get to a safe location, cry on someone's shoulder (we are all here for you) rest up so that you give birth to a healthy child that you and his/her elder sibling can enjoy safely and worry about life, the universe and the rest of the world later. You'll never, ever be as vulnerable emotionally again in your life as you are in late pregnancy, once you've given birth it'll be possible to start figuring stuff out.