It's not uncommon for mental illness to happen suddenly in the 20's and even into the early 30's. You need to talk to your family doc about this.
He's abusing you and setting your child up to be an abusive spouse. If you don't do something now it's only going to get worse.
It's like a lobster who is put into a nice cool pan of water. It swims around having fun. As the water heats up the lobster thinks "'ahhhh, a nice warm bath". Then one moment the lobster is saying "Ouch, this is a bit hot and the next the lobster is dead because the water is boiling".
Don't be a lobster and allow yourself to get desensitized to what's going on around you. He's abusing you. If you can set your phone on record or set it where it will make a video that's longer than a couple of minutes.
To catch my daughter acting crazy we got a small camera that we hid on the TV. It sent what it taped to our hard drive.
All you have to do is show proof he's like this an no judge will ever say you're unfit, unless you are.
If you truly are not keeping the house clean, not cooking, etc....then maybe you need to consider making some personal changes.
The reason I add that part is this. My dearest best friend is a pig. She lives with trash on her floors, dirty dishes all over the house, laundry growing mildew in the halls and bedrooms and laundry room, when you go to her house you have to push books and toys and dirty clothes off the furniture to find a seat.
Her husband left her, showed the court pictures of the house, and he got custody of the kids. She still lives badly but she learned to clean up. It also helps not having her pig kids around all the time too. They didn't even know what color carpet they had in their rooms. The dad had to get rid of nearly everything the kids owned because it was too small and gross.
Once he did that the kids had more manageable possessions and they kept their space better.
My point is this, if you are a slob when your husband comes home he's assailed with filth. He is reacting.
That DOES NOT IN ANY WAY allow him to treat you like this though. Even if you didn't do housework for months he has no right to talk to you or treat you this way.
I'm just saying sometimes we need to take stock of the situation. Do you keep a normal house? Then he's nuts! Do you have filth laying around being walked on? Then you need to learn some better organizational skill and tell him to shut the heck up.