WBW, It wouldn't have mattered if you had devoted all of your attention to your h and his needs because he would still have had a crisis. You are not the problem...it's his to figure out.
He could have been single, a monk/priest/minister or married to someone else and he still would have had a crisis. His crisis has deep roots from his childhood and until he resolves those issues, he wouldn't be able to move ahead as a mature adult.
You didn't break him, therefore you can't fix. The would ofs, could ofs, what ifs, would not have mattered because it's all about him and his demons.
You can still pay better attention and listen better. These are things that you can continue to work on regardless of whether he's a nutty buddy or not.
Sit quietly, the answers will reveal themselves when you least expect them to. The past is gone, the present is a gift and you need to focus on today, allow the future to reveal itself when it is ready.