I fear the other commenters are right, tbh. BUT to play devil’s advocate: that also sounds like the behaviour of someone with depression and/or social anxiety. He would rather sit about in joggers watching crap tv than socialise, I get exactly like that when I’m depressed (as I’m sure many people do). He doesn’t enjoy things anymore. Again, depressive symptom. Ditto getting irritable and defensive.
Is this behaviour ONLY when it’s YOUR family and friends, or is it all socialising?
I guess you have to look at how he was prior to this? Has he always been like this, but you’ve only just “woken up” to it? Has he changed recently? Does he have other symptoms of depression?
At the end of the day, your happiness has to come first, and you have said you’re unhappy. You deserve happiness, so maybe a divorce IS the best option for you (and FWIW, you will be great on your own! You don’t need him, or any man, to be happy and successful. YOU can do it). But if you want to work on the marriage (which you are obviously not in any way obliged to do), then maybe speaking to the GP about his mental health is a good starting place. A lot of men are in denial at first. Of course he might just be a selfish arsehole, only you can look at his behaviour as a whole and decide that.
In either case, good luck! You can do it :)