Detox from opiate pain killers must be medically supervised. You should never attempt to detox on your own, especially if you are taking high doses of the drug or have taken it for an extended period of time.
Many drug rehabs offer comfortable opiate detox through the use of specialty drugs intended to ameliorate the symptoms of withdrawal. Some examples are suboxone and subutex. However, it’s important that you find a drug rehab that intends to wean you off this detox drug as well. Otherwise changes of relapse are high as you are just switching one drug for another.