Don't blame yourself, OP. Opioids (and alcohol, for that matter) change the dopamine levels in your brain (dopamine is what causes a feeling of pleasure). That's how people become addicted. But the problem is that if you continue using, you gradually need to take more and more of the drug to achieve the same level of pleasure (because the brain adapts and becomes desensitised to dopamine).
Once you quit, it's normal to go through a transition stage where you feel like you're not getting pleasure from anything. Your brain has become accustomed to getting all its dopamine from the drug, and everything else is less effective at making you feel happy. But if you stick it out, your brain's neuropathways will gradually return to normal, and you will start to be able to feel happiness and take pleasure in other things again.
That's not the most scientific wording, but I've read a lot of literature about addiction (have detoxed and relapsed a few times in my recovery journey), and that's roughly the way it works.
Do hang in there! You might see if there are NA (narcotics anonymous) meetings in your area; they helped me. Or online meetings. Or SMART as someone above suggested. Just look for some source of outside support; it's very hard to detox and recover on your own. It's very helpful to be able to talk to other people who have been through the same thing.
Hang in there and it will get better! And be kind to yourself. None of us ever chooses to become an addict. It creeps up on you and you don't realise how dependent you are till you try to stop. But you can do this!💐