First of all I want to say that I know it's just pure bad luck but that doesn't diminish the frustration I am experiencing right now.
I play a ranger in a campaign with my friends and we are all level 3 (switched from DSA to D&D recently). Recently my rolls just suck and it takes all the fun from me since everytime I try to do something special or try to obtain vital info to continue the plot I roll bad and fail.
For example yesterday me and 3 other PCs wanted to infilitrate a bandit camp. Since I have the highest stealth value (+5) we decided it might be a good idea to let me sneak near the camp to look for guards and count how many people there actually are.
I failed my stealth check and the guard outside the camp sees me. To prevent him from calling his mates I tried to shoot him in the throat to which my GM told me that I would have a penalty of -5 on this shot (In the end my shot still has +2 since I normally have +7). As expected I failed my roll again and when we roll for iniative the bandits go first. Our cleric backs me up so the melee guys can't attack me. After that I miss 3 of 4 shots before the enemy archer gets a natural 20 on me and instantly drops me to 0 hp (I rolled low hp increase so I have 14hp max.)
I know it's just a bad luck spree but except for one or two rolls I was not able to contribute with my character to the whole campaign plot.
How do you guys cope with such situations? I love D&D and pen&paper but there is simply no fun constantly failing the important rolls and feeling underwhelmed by your own contribution to the game.