Welcome to the site, man.
All I can really tell ya is that until you stop taking opioids
COMPLETELY for a GOOD, LONG while (like a month or more at least) you will likely have this anhedonia when you're not on them. This is a big part of the mechanism that keeps us hooked.
And I have a bit of social anxiety disorder as well, so you know what I do? I don't go places where I can expect to be feeling that way, and on the rare occasions I do, I stay only as long as I'm comfortable, then I leave.
I save the being 'sociable' for things like weddings, funerals, and important birthdays of loved ones (not casual friends) ... I skip the friggin St Patties day and the bars and the clubs and all that. I go to work parties for the most part, but ... I know everyone real well so it's not uncomfortable.
Bottom-line, recovery has to come first, and interacting with people I'm going to feel uncomfortable around due my social anxiety ... is WAY WAY low on my list of 'things to do'.
So my best advice to you, obviously, is to try to get yourself totally clean, and see how you feel. My guess is that you'll feel WAY better if you quit doing this on/off stuff. That's honestly no way to live in my book. I'd rather just be strung out and using every day than clean 'most of the time'. Screw that ... I would either 'do this shit', or I'd get clean and try to stay clean. Those are the only two ways I can operate, personally. 'Chipping' like you're doing ... that's a big part of all the issues you speak of if you ask me.
Get clean, stay clean, work a recovery program. That's my best advice to you. You'll feel MUCH better in not too long.
Good luck, and keep posting