OP, are you sober now? Don't mean this offensively at all - just the way your posts are written - I wondered if you had been using (possibly drinking?)
Former addict here so no judgement, but it is relevant for people responding to you to know if you are.
If you are serious about beating addiction and substance misuse issues then that is brilliant - and it absolutely can be done. Personally I think the SMART addiction recovery handbook is a good place to start - in fact the SMART approach absolutely changed my life. Its very CBT based, and quite different to AA (which also helps many people of course) although there are still meetings if you want! But it doesn't carry the same, once an addict always an addict thing, which for me made AA a no go - I don't intend to label myself an alcoholic for the rest of my life because at one point I used to drink too much. I do intend to stay sober for the rest of my life however!
Anyway, you don't need all this detail right now. SMART would be my recommendation - the workbook will help you identify your triggers, give you strategies to cope with cravings and so on.
Good luck! You absolutely can beat this. And it's not your fault you got to this point, and it's fucking tough, but you can do it!