What happens next?

How to deal with his random mood swings
Do not take mood swings personally.
When someone is lashing out at you in a bad mood, the first step is to depersonalize. It can be very easy to be affected by someone's bad mood, to the point where you feel negative about yourself.
Before reacting, remember it has nothing to do with you. Moody people are subject to sudden changes in mood, and just about anything can set them off.