If you’ve got a boss with more personality than Robin Williams, you likely need help knowing how to deal with the mood swings. Acknowledge that the issue is probably not you as a first line of first defense, so that you don’t take all the ups and downs to heart. Stick to doing your job well to make sure you’re not drawn into the drama.
Avoid talking about your boss’s mood swings until you’ve been at the company a sufficient amount of time. Some co-worker will take your venting as gossip or complaining and may even undermine you. Be careful who you confide in.
Know that you’re never the cause of her mood swings. Your boss might feel upper-management pressure, be a procrastinator, have a bad home life or be incompetent to do her job. Do your best to not take anything she says or does personally.
Realize that your boss’s moods happen because he’s in over his head in some area of his life and can’t cope with the weight of his responsibilities. Acknowledge that, whenever his bad moments are outweighing the good, you can’t possibly know everything that’s going on with him.
Learn to actively manage your boss. Most employees think that the boss manages them, but a smart employee manages herself and knows how to communicate her needs to her boss. Know when to ask for training, a raise or time off. Note what needs to be done to improve your department and take measures to make those things happen.
Read more here