Opiate withdrawal. It is good that you are trying to get off of chronic opiates. But it is an unpleasant reaction to go through. The best way is to do this with the assistance of an expert, like a pain medicine specialist. There are medications (eg., clonidine) that can lessen some of the symptoms without leading to another form of dependence.
Ambulatory Detox. You may need to see an addictionologist who can provide you ambulatory detox. It requires a commitment to a program involving switiching to a partial agonist like beprenorphine ( suboxone/subutex) and be gradually tapered off it. There is no problem getting on this drug. There is, however, withdrawal symptoms getting off it, though not as severe. You will require very close monitoring and support.