The two-handed variation of this technique is called butt-stroking: with the US Navy of WWI recognizing 4 different techniques; upward and downward swing, a thrust, and a side-blow. As the name suggests, it relied on attacking with the buttstock. Some buttstocks were intentionally wedged shape to make swings impact like a blunt axe. It was recommend to avoid using the barrel as the weapon, as damaging the barrel will weaken the effectiveness of the gun. This technique is frequently used to attempt to break down a locked door: although high quality doors and locks can resist butt-stroking.
The first guns like the Hand Cannon were heavy enough to be used as clubs, some had sharp handles that would double as a spike. Pistols like the Pirate's flintlocks would be used as clubs after they run out of ammo, which was common for single shot. On the battlefield, the idea of using rifles or muskets as blunt weapons was frequently replaced by bayonets. However since the beginning of the use of guns to even today; it is possible to use a gun as a somewhat effective blunt weapon for both self defense and assault.
The Pistol Whip was the Special Weapon of Jesse James , and was in fact re-popularized by him in the mid 1800's.
According to the show, a well aimed and powerful blow to the skull can instantly kill a person. This doesn't mean all head blows will be instantly lethal, as the simulated fight showed.