First, and probably the easiest thing to do, is figure out what's really bothering you. But in order to do that, you need to be willing to take a step back, evaluate your emotional state, and decide why you want to react the way you do. For example, when my son asked me his question that I answered less than graciously, I can't say for certain, but I'd be willing to bet I was tired. It wasn't his question that bugged me, it was my exhaustion and being asked a question to which I thought the answer should have been obvious.
Second, determine what in your past or current situation is influencing your feelings or perception. This is where it gets a bit sticky. You have to be self-aware enough to know why something is creating such a negative response. In my case, it's the fact that I have horrible sleep habits, I sometimes honestly resent the fact that I can't sleep through the night, that I have sacrificed sleep for such a long period of time in an effort to serve my family well by not letting my schedule interfere with theirs, and that his question, while perhaps having an obvious answer to many, didn't have such an obvious answer to him. This is undoubtedly rooted in what can sometimes lead to overwhelming frustration of a late diagnosis of pervasive developmental disorder at the age of 5, instead of 3. I honestly still hate that we started treatment so late because I often wonder how much further he would be if we had found out sooner. And if you knew how far he's come, just how bright he is, and how much he has grown academically, socially and emotionally, you would think I was the most ungrateful and selfish person alive. Because the truth is God has made him amazing and I know it.
Third, ask yourself what you know to be true, lovely, excellent, and praiseworthy. This shift alone in what is frustrating you can cause a huge shift in perspective. It's so easy to go on a mental tirade of all the negative,and that is a breeding ground for Satan to get a foot in the door of your heart and mind. Slam the door on his foot, tell him Not Today, and make a list of all the good you can possibly think of.
Fourth and fifth combined, find out what Scripture says about your feelings. Now, I am NOT advocating putting a band-aid on a bullet wound. (Thank you Bianca Olthoff for that amazing analogy.) What I am adovcating, (fifth) is turning to God for help, acknowledging your HONEST feelings before him, and then asking him to change your heart and mind to align with his. It might not happen immediately, but sometimes just a little bit of a reality check is enough to start you back to where you are called and meant to be. And there is nothing wrong with bringing your true feelings to God. Don't make the mistake I made for a long time (and am still prone to doing) and repress them. Get them out to the only one that can comfort you in them.
Sixth, decide if you need to ask others to pray for you about YOUR feelings/thoughts and turning to God consistently about it but WITHOUT sharing WHAT is triggering this. This isn't about the catalyst, this is about you. The circumstances are only relevant if you want someone to tell you what you want to hear, not what you need to hear. (Sorry, but it's true. I have failed on this one many, many times.)
And finally the truth bomb wrapped in encouragement. Michelle Myers' in a class titled What Gossip Costs You said and explained this concept, "Gossip is the exact opposite of how Jesus talks to God about you." Bam. Why it hurts so much is because Jesus would never say anything bad about you, me, or anyone. He loved us all enough to die for us, he's not about to start backstabbing with his words. But why is that an encouragement while you are knee deep in mud and mire and covered in ick? Because he is up there, at the right hand of God, intervening on your behalf saying (as Michelle so eloquently put it), "I died for her. Let's help her out."
This isn't easy. It is going to take some practice, intentionality, and some gut level honesty that the majority of us are not entirely comfortable with because it makes us face the reality of the depth of our depravity. But the Gospel reminds us that nothing we do can make Jesus love us more or less and that is enough grace to keep us moving forward, growing ever-closer to reflecting more of his image and glory.