In 40+ years of D&D, I can't recall being mad at a player in one of my games when they are at the table. There are four primary reasons (off the top of my head):
1.) I generally vet new players pretty well. I've often used the statement, "I don't think you'd be a good fit for this group, but I'll keep you in mind for the next. You're too (positive trait - funny, skilled, serious, etc...) for this group, and I think it might not sit well with some of the established group becaue (XXXX)." We all make mistakes when vetting players, but puting effort into it helps create better tables.
2.) I've been disappointed in people a lot. Sometimes it is them not knowing rules or not paying attention. At other times it is them not investing in the storyline. At others it is them exhibiting unaccpetable behavior against another player, including leering, inappropriate words, taking control of the game, and many other things. As the DM, I'll take them aside (immediately if it is an immediate issue, but preferably between sessions) and talk it through. We lay it outthe options, and then let them choose how to proceed within the acceptable options. If the issue can't be fixed, I talk to the impacted individuals and then we put into place a solution that will work ... which could be kicking that person out, although it is rarely required. I should note that I take a queue from impacted people and look to see if they'd rather deal with the issue themself - as a DM, the buck stops with me, but if someone else wants to start the buck and they seem capable of handling it, I step out of the way of their bucking. Note that some of the disappointing things players do are not inappropriate and I eat my disappointment: If I think they're going to enter a dungeon and I spent 20 hours over 5 weeks crafting it - and they decide to walk away and never explore it, it sucks for me - but that is part of being a DM. I can save it for a future campaign with some tweaking.
3.) While it is my favorite game by a long shot, it is just a game. If you're getting emotionally angry at people playing the game, you need to assess how you're playing it.
4.) When I'm frustrated, my first step is to try to put myself in their shoes. I try to think about the situation from their perspective. I try to find a bridge between the current situation and something that will make me happier that is an evolution of their situation that they'll want to consider developing. I don't try to yank them off their path - I try to adjust the terrain ahead to get them on a path that works better for everyone.