I am glad that good things came out of today, but I understand that it would be hard to go through.
You are right that you need to let him go. You wouldn't want the person that he is right now anyway. And even though the changes that you make in yourself won't change his mind, it doesn't matter because you needed to make those changes for YOU and no one else. Your H may have chosen to throw his life in the gutter, but your life doesn't have to go there too, and you should be very thankful for that.