I am so sorry for your loss. And for the dark journey that you have been through. You sound like the kind of guy who may be able to find the positives, the rays of light in the story. That is what I wish for you.
You are not a failure. The way you and your wife and family handled this is not the way failers would do it. I watched a lot of kids grow up, and I have become convinced that they come into this world with their own personality and spirit. As a parent, you do the best you can to help them, but they have their own path to walk.
A family that’s close to me has two sons. One is the athletic Director at a small college, and the other became an alcoholic and nearly killed himself. (he’s been in recovery for maybe 10 years now and he’s doing OK) They were both given all the love, and every advantage you could give a child. They all have their own path to walk.