The addicted brain (regardless of the addiction - can be alcohol, heroin, methamphetamine, cocaine, even gambling) is biologically different and takes time to heal. This is why rapid detox programs often fail. See the pictures below (kindly supplied by Professor Jon Currie, neurologist).
See Dr. Igor Jakubowicz for further discussion and consider referral to Prof. Currie if you have a complex problem, especially if your problem is not heroin addiction. Heroin addiction can be treated with methadone or buprenorphine.
In many ways, addiction is as much a disease as diabetes or asthma (a chronic relapsing lung disease). There are distinct biological changes in the brain of addicted people.
The picture above shows that all addictions are fundamentally the same.
The patchy, reduced blood flow shown above in heroin addiction seems to be present in all addictions, including alcohol and speed.
Recovery will happen given TIME.
Recovery takes upwards of 12 months. This is why rapid detox programs are often unsuccessful.