In urban areas, I try to look as plain, bordering on grubby, as I can. I carry a small kit (purse-like shoulder bag with camera and a few primes and my small travel tripod). So far it has kept me out of trouble wandering through the cities I visit. I think pepper spray is probably a good measure for you although I figure my tripod and even my camera might be used for defense if it came to it. I also try to carry myself in a way that says I belong there. I've had homeless guys hang out and tell their life stories to me while I shoot but never felt like they were a threat. Giving those guys a few dollars doesn't hurt either, especially if you might come back sometime.
In wilderness I feel much more at home and have never had a run-in with hostile wildlife or people. I just try to be aware, identify my likely risks beforehand, and be prepared for the things you know you will encounter like the risk of falling, avalanche, or exposure. Something like a
Spot Navigator is a good idea if you go solo. I should probably get one but I haven't done it yet. Don't count on cell service, there often isn't any in truly remote areas.
My wife sometimes comes along, but usually doesn't. She's not that interested in photos when it's -20 and it can add stress for us both.
I also sometimes bring a friend or another photographer but the majority of my shoots happen solo and I like it that way.
I think for your urban outings, a camera club or some kind of group is probably a good idea, at least until you get more accustomed to doing this kind of thing.
If you ever want to catch a sunrise around Gunnison County (scenic Colorado) I'd let you come along with me if you like. I'm pretty harmless.