Managing emotions

Co

So long story short is that I live with my husband and his best friend as our roommate but my God is the friend so damn frustrating. I just get so annoyed around him. He's one of those people that ALWAYS has to be right and that the women belong in the kitchen cleaning the house etc. Anyways he's been gone for a few months and it's been sooo nice between my husband and I no fighting the house is clean etc. The friend got back a few weeks ago and it's kinda gone down hill since then. I just need help or any tips to help control my emotions because when he's here I just get so temperamental and I end up taking it out on my husband and I don't want to do that so I need help. Any advice? Tips? Tricks? Anything?