The one poster who made the point about food storage and other things that reduce your attractiveness to a hungry bear (or other wild critter) had the first good answer. The less interesting you are to wild critters, the less trouble you will have. (Kind of like urban survival, but different steps.)
Then: A trustworthy partner with a 12 gauge, loaded with Brenneke slugs. If you do step one correctly, you won't need step two. If you need step two, it better be well done.
When we went to Yellowstone some years back, I paid attention to the stuff about respecting wild critters and giving them distance. I gave the young elk a good bit of room, as much as it was a treat to watch. I did not mess with Bison; even watching them out of van showed how big and strong they are. The videos of idiots being flipped pretty far into the air when they tried to pet one like a dog got my attention. When I saw what I believed to be signs of bears, I went back. It's their home, and they are by far better equipped for it. I live by that rule on the rare occasions I go into wild areas now.