When I first started reading your thread, I thought that there was probably mental health issues involved (probably is). When I read about him staying out all night, like others here- I instantly thought there was something else going on as well, probably another woman (sorry to say). Really now, it sounds like there are multiple issues. He doesn't sound like he is even in touch with reality.
I agree with the advice to GET A LAWYER.
You need to get professional advice from SOMEONE there locally that can tell you whether to get a restraining order, how to set up supervised visitation, etc... I would do it right now, today, don't wait. I definitely would not be alone with him or let your kids be alone with him at this point. I think you did the right thing. Don't second guess yourself. Your instinct to get out of there and protect yourself and kids was spot on I think.
As a side note- You might want to alter your signature line and remove some of the identifying information like your name. I would hate to see him find this thread and try to use it against you.