Fun question, with no definitive and generalized answer. While I have a greater interest in guns these last 7 years or so, they were always only just a part of my defenses. I have been a student and practitioner of several martial arts, but more importantly, I have a lot of real life experience in their use, from doing personal security work to time as a fighter to bar security to teaching self defense, That's the background.
All of that being said, there three most important things to remember:
1) Common sense.. If someone is screaming abusive language at you, it should follow in your mind that there is a chance that person may physically attack you.
2) Situational awareness: Following the above, be aware of your surroundings, listen for footsteps, and look around, especially in the area of the abuser.
3) HAVE THE PROPER MINDSET that will allow you to do what you have to: I'm not a particularly violent guy. I went into fighting as one way to test what I know ( and get a little money too). I never really want to hurt anyone. However, I chose to step on the mat with someone whose job it was to kick my as and inflict damage. I had to be willing to do the same. It's fine to say that you carry this weapon or that one and have strong hand-to-hand skills, but none of it matters if you can't get yourself to use them. I know people who walk around with big belt knives all of the time but would never be able to push it into another person and deal with wet work. If you are carrying a firearm, will you bay be able to draw it during a surprise attack from behind? If so, can you instantly shoot without worrying about how it hits, fatal or not?
I taught free self defense classes to battered spouses. I finally stopped because more often than not they continued to put themselves in dangerous situations or refused to defend themselves when the time came. They needed therapy more than fighting skills.
However, after all of the above, I will give a helpful hint: Learn some hand-to-hand. Then, If you know that you are about to be attacked from behind, prepare to pivot as the assailant reaches you to use their momentum against them, throwing them off balance. However, fun fact: It takes more effort for a taller person to throw a shorter person than a shorter person to throw a taller person due to the lower center of gravity. When throwing, try to get your belt level lower than the attackers, then pivot. All about knowing how.
If you you don't, then I suggest either carrying a fighting cane, a pepper spray or stun ring in hand at all times to incapacitate and run.
OK, rant over.