Yeah sound like you've made it through the worst of it. Like I mentioned before, you weren't on that high of a dose(comparatively) so the withdrawals will be fairly mild. Hopefully this can serve as education of what can happen though. Things can almost always get worse, so it's really good that you stopped it when you did.
Just a word of warning.. a lot of people have similar feelings of "never again" but that doesn't mean you won't ever again. Just like when people drink too much and say "never again" while going through the hangover, but quickly forget once the hangover passes. The thing is that feelings are fleeting, both positive and negative. It's easy to say things like this when dealing with consequence, the real challenge comes when you are no longer feeling like this. When you are unhappy, depressed, in pain, lonely, etc., the urge to use might return. And when the urge comes back when you are in a "fuck it" kind of mood, things can get dicey.
You mentioned that you used it to help with depression or sadness as well as physical pain, possibly even more so for emotional pain than physical towards the end. I don't say this to shame you, but hopefully to bring some awareness to WHY you used, and why you might use in the future. By better understanding the why, where, and whens you can start to identify some of the possible triggers or causes of relapse in the future. You can then take preemptive actions to prevent yourself from getting in the same position. Things like therapy or counseling might not be a bad idea, maybe even couple's counseling just so you can better communicate this with your wife and family. Or even just thoroughly discussing how you will handle the pain after the surgery, and some contingency plans if things go astray.