In a Philadelphia-based study, "individuals in possession of a gun were 4.46 times more likely to be shot in an assault than those not in possession" and that grew to 5.45 times more likely if the assault victim had a chance to resist. [1]
Successful defensive gun use happens, but it's the exception to the rule: guns escalate conflict, especially when both parties have them.