The Duumvirate and a few other Illuminati do this in response to abject stupidity.
At the end of Jules Verne's Around the Moon, the leader of the rescue team realizes that the crashed spaceship they are looking for can actually float, so they searched it in vain for many days with bathyspheres on the ocean floor. He then performs a facepalm, forgetting about his Hook Hand, and knocks himself out.
Near the end of Men at Arms, Sam Vimes does this when he is told that Captain Carrot has come to the tradesman's entrance of his house.
In the Honor Harrington novel The Honor of the Queen, Ambassador Langtry does this when Mr. Houseman reveals his idiocy and upgrades to a double when things go From Bad to Worse.