Try not to look like a good target. (whatever good means in that area: American, rich, weak-looking, etc)
When you make stops, make sure you are ready to ride away quickly. (don't have to backup the bike, put on tons of gear, etc.)
Forget about "self-defense". That's a waste of time unless you're willing to put in a few years in the gym, sparring under realistic conditions, etc. And even then, there is no "self-defense" against a gun or multiple people.
I think pepper spray may be the only thing worthwhile... maybe...