Lysol said:
If you can get one, I'd recommend a derringer. Don't even really have to do much to get it out of a holster and into an attacker's guts, and the smaller caliber bullet means it's probably going to bounce around a bit before it stops, doing a shitload of damage and making sure the idiot doesn't try that shit again.
1. derringers are terrible unless you are familiar with using firearms in general, and often they are inadequate for personal protection whether by caliber (underpowered and has trouble with stopping the threat in a timely manner without precise shot placement) or design (tip up barrel/break action, unshrouded trigger, limited capacity, et c).
2. bullets do not "bounce around" inside a target. i've shot a lot of things, animals, and even some people, and the closest i've gotten to internal riccochets was a 30-30 spitzer fragmenting off the "inside" of a bear's ribcage and came back into the torso to embed into the lungs a little. if a bullet has enough energy to riccochet, it is almost certainly going to have the energy to either exit the other side, or fragment into low-mass pieces that tear a short distance and then stop in thicker tissues.
3. firearms are the great equalizer, but they aren't always the correct defense option for all people. in this precise circumstance, a combination of grappling techniques to escape a hold would have been more useful. the weapon selection after escaping a grapple is emphemeral. with any self defense, you always want to be trained by competent professionals, and put what you are taught into regular practice (by keeping fit with sports, by participating in a classroom setting, by making appointments to a firing range or dojo or boxing ring).
it's also worth noting that "pepper spray", "mace", and "OC spray" are different things. pepper spray is on the lower end as a cheap, easy to manufacture, and portable irritant/deterrant. as pepper spray depends on capsicum in low concentrations enough to be suspended in water, many people are completely immune to its effects. "mace" or more properly branded "Mace", is a brand of CN tear gas that's been dissolved into a hydrocarbon carrier for aerosolized dispersion. fewer people are immune to tear gas, but due to it's lighter-than-air properties, and that it's easy to wash off, it has little staying power and acts more as an irritant. OC Spray is concentrated "super pepper spray" usually with an emulsifier like propylene glycol, then suspended in water, to allow it to aerosol. capsicum is not water soluable, is an extreme irritant, and the combination of the higher concentration over mundane pepper spray (rating systems vary) and the emulsifier means that immediate exposure to mucus membranes is the feeling of being set on fire, the inability to breath, see, or swallow, and often the feeling of choking.
i generally recommend Red Sabre as a less than lethal alternative, with TASERs or a baton possibly.
not all chemical irritants or firearms are viable in all ares, consult your local laws. consider some grappling instruction, consider a single stack semi automatic handgun in 9mm, consider upgrading to OC Spray.