I had this too. I was on 1-2mg/day (yes, mg) habit of IV fentanyl. Dilaudid if I couldn't find injectible fent. I suffered profound depression for about the first 2 years. My brain chemistry took a long time to readjust from years of active opioid addiction. I found that SSRI did not help AT. ALL. I was on Wellbutrin for a bit and that helped (it works on norepinephrine and dopamine rather than serotonin).
Rewiring my brain became of the utmost importance. I did it through individual therapy (CBT), group meetings, 12-step work, and service work. It was tremendously helpful.
I am almost 6 years sober and very happy. It was very slow-going at first, though. I would say give time, time. Don't give up before it starts working! It literally took years for me, but it was well-worth the work and the waiting.
Glad you are here.