As far as wilderness situations go I'm not likely to be anywhere where a gun would help against wild animals. At best it is a noisemaker. Stranded in the rare 'wilderness' in the SE I wouldn't be doing much hunting or fishing. Taking time to hunt would just detract from my primary task of getting rescued, if I couldn't walk out, or walking out.
Down here in Florida we have black bears, panthers and gators. Black bears are invariably shy unless cornered or surprised. Panthers are pretty much extinct. I would feel privileged to see one. Gators lay in wait and attack so swiftly that even with a loaded gun in your hands with the safety off odds are you still get bit. Gators are notoriously numb to damage so you have to hit a vital spot. Good luck.
A fellow hiker pointed out the threat of wild dogs, hogs and snakes. Right. Never had a problem with wild hogs or dogs. They sniff around. You yell. They flee. And the best tool for dealing with a snake is still a stick. You could beat it but I generally just flip it out of my path. Not a big problem.
For the far more likely urban or suburban situation a gun has only one use: To renegotiate a power imbalance. Even then it is always left concealed and the last resort. A lot of gun people lead with the gun and neglect their skills in human relations. IMO 99% of the situation you can fake, talk, bluster or negotiate your way out of a confrontation faster, easier and with better results that what you get if you pull a gun.
For that rare 1% a .357 revolver with a 3 or 4" barrel and 15 rounds comes in handy. You not fighting a war. Your negotiating the peace. Keep it well under wraps but not so buried that you can't get to it or discreetly let someone know that your not defenseless. No need to bring it out into the open or wave it around.
A shotgun would IMHO be ideal because of its reputation and visual impact but it is both heavy and bulky. A simple pistol is likely to be more than enough to deal with your average street thug, waylayer or bully. IMHO a .357 revolver is the sweet spot between bulk and weight and effectiveness.
Just remember not to shame anyone or make it personal. Be polite and be prepared to take an insult and look less dominate. Even while protecting yourself. A public display of subordination combined with a private understanding that if attacked the lead guy gets shot can be a powerful combination. This allows the other guy to look magnanimous letting you go. He gets to preserve his reputation for not backing down and you slide on through. Your looking to get out of a situation and advance toward safety not get into a feud or clash of wills.