An effective way to calm down is by practicing deep abdominal breathing, sometimes called 'Deep Belly Breath'.
Thinking calm is hard when things get frustrating. You breathe faster than normal when you feel angry, upset or grumpy. But STOP and take a few deep breaths in. You need to bring your breathing pattern back to normal so you can think calmly again.