Life gives you lemons make lemonade. In a quiet moment, maybe draft him a letter (or email) for him to read in his own privacy, while you respect him for wanting and needing a divorce. Could he share why and what you did so as to improve yourself.
After he tells you don’t attack, just listen.
If the problems are truly yours and you own them, start the fixing now while he is in your presence. If the divorce follows the path before you sign, ask him if the work you have done (post letter) appears to have been better and how you are doing before you go on your way.
If you do hit the root cause items, then who knows.
Be well and remember life is short and too short to stay angry or to be in a substandard marriage or relationship.