I have no experience with opiates, but i have been staying abstinent from alcohol (only for two days) by trying to think about the aftermath of my drinking. Withdrawals, the embarrassment of what i may have said/done on my blacked out binge, the guilt from all the lies I'll have to tell whiIe recover.
Thinking of that misery makes me less inclined to go grab that first drink. I wish you good luck and hope you can stay sober!