Keep calm and...
Sleep on it.
Go for a walk.
Take a fun day.
I like my job, but sometimes a crappy email, a malfunctioning database, or a stupid request (subjective of course) really grinds my gears, chaps my ass, cools my coffee... you get the idea. Workplace frustration is to be expected when you spend nearly a 1/4 of your waking hours working in the same environment, with the same people, dealing with the same tasks. The trick of course is to respond in a constructive manner, and that, can be easier said than done.
Sleep on it. Many careers have been jeopardized by responding to an email string in the heat of the moment. I've seen some real beauties. "Well John you can go *&^% and Sally you can %*&^*". Regardless of whether a response is warranted, telling everyone what you're really thinking at the time is almost certainly a bad idea. Instead sleep on the crappy situation, and respond in a measured fashion the next day. Thank goodness for civility in a new day.
Go for a walk. Been reading code/documents for 4 hours straight? Can't find the typo? Find yourself rereading the same page over, and over? Sounds like it's time for a walk. A quick Google search finds many articles on the benefits of walking breaks at work, and they don't have to be that long to have the desired rejuvenating effect. I am a morning person, and so by afternoon it can be difficult for me to continue a high level of productivity. Taking walks is a trick I often use to squeeze another couple useful hours out of my day. Even better, have a walking buddy who can talk shop, or not, depending on what the day requires. I've solved many work-related stalemates on walks because my mind drifted to the natural solution on its own, once fretting over the other stuff faded.
Take a fun/different day. Consult with client, mock up SQL code and then craft a dashboard with trending line plots, as per usual. Rinse, repeat, yawn! We all get bored of our jobs from time-to-time, but there is a reason a significant part of the web is dedicated to 'life long learning' - maintaining sanity. We are experts at our jobs because we keep doing similar tasks, or processes on repeat. The advantage to your employer (and yourself) is that you can churn out great, reliable stuff efficiently, and clients are happy. The downside of repetition is you inevitably get bored and start wondering how green the grass is across the bridge. I probably take a fun/different day once, or twice a month... depending on the slog. These days (aggregated over time) allow me to learn a new programing language, skill or technique, which I believe is in the best interests of both myself and AHS. For example, my current development project involves parsing free-text nursing notes using Python and NLP techniques. For those in the data world, you understand the challenge.
So there you go - not rocket science per se- but three different ways to stay calm and enjoy a quarter of your life a little more!
I take a break by working on the puzzle in our lunchroom when I feel my brain overheating. Somehow the mundane task helps to defragment my brain ... temporarily.
By the way this advice also applies to stock markets!