For me it seems that getting angry or irritated makes me less intelligent but it didn't try testing it. Has there indeed been such tests or anything else about testing IQ levels of different moods for the same subject?
The first question that should be asked is, do you mean cognitive ability or IQ? They are intertwined, but different. Unfortunately, I can not comment. I'm going to answer based on the question in the title.
Yes. Walter Mischels work on self-control indicates that anger, a "hot" emotion led by the amygdala in the limbic system, will provoke more immediate response. Limiting cognitive abilities like working memory, judgment and evaluation, reasoning and "computation", decision making, and comprehension.
The limbic system consists of primitive brain structures located under the cortex on top of the brain stem, which developed early in our evolution. These structures regulate basic drives and emotions essential for survival, from fear and anger to hunger and sex... Within the limbic system, the amygdala is especially important. It plays a key role in fear responses and in sexual and appetitive behavior. The amygdala rapidly mobilizes the body for action. It does not pause to think and reflect or worry about long term consequences. (Pg 43)
The hot system is ... Reflexive, simple, emotional, it automatically and quickly triggers consumptive behavior, arousal, and impulsive action (Pg 44-45)
This hot response is not useful when success in a given situation depends on staying cool, planning ahead, and problem-solving rationally. (Pg 45)
The "cool" cognitive system, where we find our cognitive abilities.
Closely interconnected with the brain's hot system is its cool system, which is cognitive, complex, reflective, and slower to activate. It is centered primarily in the prefrontal cortex (PFC). It's important to note that stress attenuates the cool system and accentuates the hot system. The hot and cool systems continuously and seamlessly interact in a reciprocal relationship: as one becomes more active the other becomes less active. (Pg 46)
The PFC is the most evolved region of the brain. It enables and supports the highest-order cognitive abilities that make us distinctly human. ...Unlike the hot system, the cool system is attuned to the informational aspects of stimuli and enables rational, reflective, and strategic behavior. (Pg 46)
Here we have a pretty clear description of how anger, "hot", limits the cognitive abilities of the prefrontal cortex, or the "cold" system.
Prolonged stress impairs the PFC, which is essential... for things like surviving high school, holding down a job, pursuing an advanced degree... and refraining from decisions that seem intuitively right but on closer examination are really stupid. (Pg 49)
In the same book, research done by nueroscientist Amy Arnsten at Yale is mentioned,
"Even quite mild acute uncontrollable stress (like that caused by anger) can cause rapid and dramatic loss of prefrontal cognitive abilities." The longer stress persists, the more those cognitive abilities are hurt and the more permanent the damage, ultimately leading to mental as well as physical illness.
(Italicized content is a personal addition to clarify how anger can cause uncontrollable stress)
Demonstrating long term and short term impacts of stress caused by anger and irritation.
Walter Mischel. "The Marshmallow Test: Why Self-Control is the Engine of Success". 2014.