I suppose if the gun is empty, you don't have any chance of reloading it, and you don't have anything else better on your person to use as a weapon, you might as well whale away.
If the gun is still loaded, then using it as a contact weapon can damage it, jam it, activate or deactivate controls unintentionally, cause it to discharge unintentionally, make it more accessible to the attacker, increase the likelihood of dropping it, or injure your hand.
Also, if, while it is still loaded, you use the gun as a contact weapon and cause serious injury or death (i.e. exert deadly force with it) you could really complicate a claim of self-defense by making it very difficult to answer the following questions:
1. Did you believe that deadly force was justified at the time? (You have to answer yes to this or you'll be admitting that you used deadly force without believing it was justified at the time which is, of course, a very serious crime. Remember that your reasonable belief that deadly force was justified at the time is a factor in whether it was or wasn't justified.)
2. Then why didn't you just shoot the person? (Now you have to come up with some plausible reason that also plays well to the jury to explain why you felt beating the person to death was preferable to shooting them WITHOUT ever implying that you had no intention of using deadly force. Good luck with that. If in the course of that explanation you admit or imply that you didn't mean to use deadly force, see #1.)
You can claim that it was an accident that they were hurt/killed, but this is a strategy you should only use once you've realized you have no chance of a valid self-defense claim and you're trying to plead guilty to a lesser crime.