Harry gets quite upset at the concept of being possessed by Voldemort during his teenage hormonal phase in book 5, at least until Ginny reminds him quite sharply that she's been there and done that, and it's not at all like what's happening to him.
Happens at least once in Dragonquest, when F'lar thinks he's about to die.
In Brothers of the Snake, Priad has to smack his battle-brother Natus across the head to get his attention off the blasphemous text the heretics defaced the statue of the Emperor with.
God often sends his angels to give words of encouragement in The Bible, but on the top of the list of epic "Get A Hold Of Yourself"s from God Himself is when Elijah has a Heroic B.S.O.D.. Full text here, but here's a sample:
"Then a great and powerful wind tore the mountains apart and shattered the rocks before the LORD, but the LORD was not in the wind. After the wind there was an earthquake, but the LORD was not in the earthquake. After the earthquake came a fire, but the LORD was not in the fire. And after the fire came a gentle whisper."
In Dave Barry Does Japan, the author receives a big SLAP (possibly from himself) when he goes off on a long rant about American bureaucracy.
In the Old Kingdom trilogy, Lirael has a dogbite-shaped scar on her leg from when her wangst was getting way too out-of-control and the Disreputable Dog decided to intervene. After that point she learned her lesson and decided to just deal with the situation she was in without too much whining.
Happens once in All Quiet on the Western Front, when a newbie in the trenches is getting hysterical to the point of trying to leave the bomb shelter. Everybody else in the shelter beats him up until he doesn't try to leave any more. The narrator tells us that it's not pleasant, but it's the only thing that helps.
In "The Brain Stealers of Mars", Rod Blake starts laughing hysterically after encountering an alien disguised as Ted Penton. The real Ted Penton cracks him across the face to snap him out of it.
In "Who Goes There?", McReady slaps Kinner's face "with a methodical one-two, one-two action" when he bursts into hysterical laughter upon finding out the Thing is (apparently) dead.
In a Sweet Valley High book, a toddler is choking. Her older sister cannot wrench her away from her hysterical stepmother and remembers reading that when someone is hysterical, the best things to do is slap them. . .and she does. The woman's stunned reaction gives the girl enough time to get the baby away from her and perform the Heimlich, saving the child's life.
In The Wise Man's Fear, Bast panics when he realizes Kvothe spoke to the Cthaeh. The Chronicler snaps him out of it with a slap, which is the opposite of their usual interactions.