Blue - I have had similar things happen to me in early recovery. In fact, it has been happening recently. The best way I could describe it is consternation / confusion. It has been getting better though.
The first thing I would say is that I don't think you in any way failed him. At the end of the day it is on him to do the work. I look at it as an overall positive though. He wasn't feeling right and he reached out to his doctors. Also, he didn't use, which is all that really matters at this point.
Even with all of your efforts and the doctors efforts it may or may not work. That part will be up to him. However, I think you are doing the right thing to try everything in your power to help him. If it doesn't work out then it seems like it would be easier to accept if you tried everything you could think of. How could someone walk away from a marriage without trying everything?
I do think that you are doing the right thing in at least trying to help him. In fact, I think you are doing a great job. With regard to the broader question of whether a spouse can have an effect on someone else's recovery here is what I think:
The idea that a spouse cannot have ANY influence on a loved ones recovery just strikes me as absurd. Our spouses are a critical part of our lives and the behavior of one spouse does have some impact on the behavior of another. If anyone disagrees with this then I would ask them why a spouse is afforded some special status in life. If someone in recovery hangs around with old using friends then it would be clear to me that it would have some negative influence on the recovering addict. If not, then why do people seem to take care about avoiding old using friends? There would be no reason to avoid them unless you believe that others had SOME influence on us.
My opinion is that every action we take during the day has some influence on others. From something as simple as a sneer or smile at a waitress at breakfast to a blow out fight with our spouse - it all impacts those around us. The concept of a spouse of an addict saying that there was nothing that they could do seems like a cop out to me. It is a way to avoid facing any of the problems that they cause in the marriage / relationship. No one is perfect, and everyone makes mistakes. We either own up to our mistakes or we spend our whole life blaming everyone else.
To solely blame the addict for everything gives the spouse carte blanche to act in any way that they so choose. The advice that spouse then gets is that NOTHING was their fault. That would be a simple way to justify ANY behavior in a marriage just like an addict's AV can come up with any justification to continue using.
I am sure some will construe this as an addict trying to blame others for their using. That isn't the case at all. The addict can always choose to terminate the marriage so long as they put not using as the absolute priority in their life. However, a spouse that takes no responsibility for ANY behaviors that they take in their marriage is putting the addict in an impossible situation. They can either continue leading a life of abject misery until they break down and use or they can leave the marriage. Either way, without the spouse making changes in their life too the marriage is certain to go down in flames. I have yet to see the first person that was the spouse of an addict in a failed marriage take responsibility for any of their own actions.
In my case, I recently found out that during my recent 1 1/2 years of clean time my wife was intentionally making things difficult because she wanted to punish me for the past. I was furious at first, but I am glad that she admitted that. If she hadn't done that I would have continued resenting her about it for the rest of my life. Things are getting much better now, but I did come to the realization that it would be impossible for me to stay clean long term if the marriage continued in that manner indefinitely. That is a prime example of a spouse having a negative influence on recovery. I still accept responsibility for my relapse though. There were things that I could have done differently and I should have chosen divorce rather than using if it came down to it.
Anyway, sorry for veering off topic. I think what you are doing is commendable and you seem like a very caring person. If it doesn't work out in the end you will at least have the comfort of knowing that you did everything in your power that you could.