While the accepted answer is great, and probably spot-on, I'd like to address one other aspect of the narrative that I haven't seen anyone else talk about:
The DM.
Bad rolls happen, you have to deal with them. The DM should not fudge dice in your favor, but neither should they totally ignore your attempts to engage and even circumvent your heroics. It beggars the imagination that a group of bandits would just ignore an armed and armored warrior in their midst, especially when they had you outnumbered, etc, but beyond that having an NPC roll in and save someone that you were trying to save?
I'd recommend in addition to the other suggestions here, also talk w/ your DM. Both from the perspective of "hey, help me figure out my tactics" but also, "Even if I'm not successful, I feel like heroes should be the focus of the action, can we talk about that?"