It’s a question we’ve asked ourselves many times concluding no we’re not to blame. It could be different in an abusive family but for us run of the mill parents doing coir best no, it’s not our fault.
One of ours had a very similar experience to your son doodle What could we have done to make it different? Heavy criticism of a new relationship (we were tempted!) often triggers the opposite reaction to that sought. During the marriage we plastered on smiles and tried to keep good relationships all round. When the marriage ended we supported adults and children as we could. 8 years on the children are kind, competent teenagers and both adults are happily settled, one in a new relationship the other content to live alone.
Your son isn’t a failure, he’s worked hard to hold things together. The feeling is understandable, it was one experienced in our family, all we can do is reassure and wait for it to pass, it will, just takes time.
I’m sorry your family have this distress and pain, we never stop worrying about them for sure.