What I'm about to say is coming from a person who was once an intravenous drug user. (Brief background: I began using drugs at 16 and when I was 20 I began shooting up opiates including heroin and Oxycontin. When I was 17/18 I spent over 11 months in a rehabilitation facility in rural Vermont but ended up relapsing within one year. In the end the intravenous drug use lasted for about six months until I finally moved out of state and started entirely over in a new place where I knew no one and therefore had no way of getting drugs. I have now been sober for four years.) I know what it's like to harbor this kind of addiction and I know how he's feeling right now. I also know what it's like to have a family member who is an addict and how absolutely gut-wrenching it is to think about them living that kind of life. I've lived both sides of the addiction coin.
With all that being said, you need to give him an ultimatum as soon as possible. He needs to go to treatment or risk losing you and your children. There's no way around it. It simply isn't safe for any of you to be around him in this state. Unfortunately recovery won't be achieved unless he genuinely wants it but people often hit bottom and seek help once they're given strict ultimatums. Once they have incentive to clean up they're all the likelier to get sober.
Know that how he's acting is only temporary and it's because of the drugs. If he's acting detached it's not because he doesn't care, it's because the drugs have numbed him. It's also because he probably experiences withdrawals when he runs out of heroin and that will send even the most sensible people into downright depression and rage.
Also know that it's entirely possible for him to sober up. Don't leave him just yet. You absolutely need to support him right now but be firm with him. You guys need to get him into treatment as soon as possible if he's to have a chance at getting better. Another thing that will help is educating yourself. Here are some links you should read up on:
http://www.treatmentsolutions.com/understanding-the-drug-addict/ (A brief summary about understanding drug addicts; this site also has links to treatment centers.)
http://www.drugabuse.gov/publications/teaching-packets/underst (Scientific explanations for drug addiction as well as information on how addiction affects a person's mind and body.)
http://www.everydayhealth.com/addiction/drug-alcohol-withdrawal-and-detox.aspx (Understanding withdrawal from addiction.)
If you need anymore information or simply someone to talk to you can always message me. Like I said, I've lived through addiction both first and secondhand. I also majored in psychology in college in order to pursue a career in addiction therapy. I've worked at one facility and plan to further my education and work experience in this field once my son is older. I know A LOT about addiction, especially addiction to opiates. I mention this because I want you to know that if you need anything you can message me.
It's not impossible for him to get better. Good luck.