Spending time with a nasty negative person can wear you out. He is ugly inside, for one reason or another. Typically when people turn everything into a negative exchange or spat, they are struggling with unresolved anger issues.
People with unresolved anger issues have built up resentments brewing just under their skin. It does not take much for them to get pissed off and when that happens, they release their toxic steam. More times than not, they get angry over just about anything and everything.
Unless he gets help, I am sorry to say that his problems will only magnify in time. I bet he has alienated other people in his life.
If I were you, every single time he is mean and angry, get up and leave the room. Let him stew in his own hateful feelings and remove yourself from the situation.
You also must realize that this behavior is not your fault and you did nothing to deserve it. This is really all about him and his problems, the issues you have with him are just a symptom of his problems. Do not take what he says personally because quite frankly, you cannot try to make sense out of nonsense. A man who cannot even take a compliment about a shirt without it turning out to be a shitshow has issues that have nothing to do with you.
How do you fix it? STOP putting up with it. If you have been putting up with this type of behavior for a long time and finally voice your distain, your husband will think you are nuts because you never complained about it before.
So, during a calm moment, sit down and tell him that his negative behavior is counterproductive and if it does not stop, he will completely alienate you. So, if he keeps up the behavior, KNOWING how you feel, then he just no longer cares.
Then, that is your ticket out of the marriage, perhaps. You may want to go to marriage counseling, with or without him. Because either way, you are going to need the strength to stay with him or the strength to leave him.