This is obviously oversimplifying, but there are two common approaches to how to respond.
The first is "You're my customer" (figuratively speaking), which means you try to be helpful in spite of the tone of the person asking for help. Sometimes empathy goes a long way -- instead of thinking "This guy's being a such dick", ask yourself "Why is this guy being such a dick?". On the other hand, if the tone is a little too belligerent, it's also important to note that some "customers" aren't worth having, and you get rid of them.
The second is "I'm doing you a favour, you should appreciate it". Usually taking this perspective starts with "if you don't like it, go elsewhere" and it rarely ends well.
I typically try to treat everyone in my dealings (employers, employees I manage, and my peers, etc.) like customers unless they force me to not to, but they always get the benefit of the doubt the first few times around.
What I typically find with people who are extremely frustrated who are looking for help is that they become extremely thankful and contrite once you've helped them, especially if you showed them a little empathy in helping them.