As a fellow female rider who has suffered from anxiety in the past....
I'm thinking that it isn't so much a worry of being attacked as it is a worry that 'something' bad will happen while you are out there by yourself?
I get that way sometimes. What I do, if I'm going to be in a shady area alone, is carry an old flip phone that only calls 911 (and has a battery that never dies). That way I always have a voice out.
I wouldn't bother with weaponry. If you are scared, the chances are better that the weapon will be used on you rather than you use the weapon. Or, in your anxiety you may overreact and hurt someone.
I can understand (barely) carrying a gun around if you live in Southside Chicago.. but a small town? Not so much. Instead, work on your speed. Any 'hilly billy' isn't going to be able to catch you on that bike.
I'd also suggest working on your anxiety. Find what causes it and work through the problem. It took me a few years and some medication and a little therapy (and learning to let go of my need to be in control at all times) but it can be done.
Cars, you get used to cars. I ride in a downtown area most of the time. When I first started I was scared to leave the sidewalk. Now, after time, I can and do ride in traffic. The vast majority of drivers are decent types who don't want to hit you as much as you don't want to be hit. Just try to pick your roads carefully. So, instead of the local two lane highway, take an old logging road or a dirt road that isn't traveled much.
I had a problem with a dog once, years ago. I kicked him on the nose and he ran off. I hear that a lot of bikers carry dog mace for dogs. So mace or a good sharp shoe?
So, that's my advice. Work up to tackling what scares you slowly while working on the root cause of your anxiety. You can do it a step at a time. best of luck and welcome.