Everybody makes mistakes. Even National Champions renege or lead out of turn, or miscount trump, or make any other of a myriad of errors. In fact, a couple of decades ago I paid to play with a pro. I was a good enough player at the time that he asked me why I was paying him to play with me. I told him I was tired of my partners making silly mistakes and just wanted to play with someone I could trust to not make those mistakes.
Early in the game we were in an auction in which the opponents went into Blackwood and my RHO responded 5 Diamonds, giving me the opportunity to double for a lead, since I had the AK of Diamonds. They ended up in 6 No Trump with my RHO declarer. I doubled, figuring that with me on lead and with two sure tricks in my hand they were going to have a hard time making the contract. When the auction was completed, my partner, the pro, immediately led a Club, thereby violating at least three rules. He didn't ask if it was his lead, he led out of turn, and he didn't lead my suit. So much for counting on a pro to make no mistakes. I never paid anyone to play with me again.
If a pro could make dumb mistakes like that in a Tournament, then you should realize that ordinary players make even more mistakes than experts. Sometimes you are in an unmakeable contract. The only way you can make it is for your opponents to misdefend or make a mistake. You should realize this and give them a chance to make that mistake. Here's a good example from a hand in a recent game:
Dealer: North, both sides vulnerable
Opening Lead: Ace of Spades
I'm sitting West. Looking at the dummy I'm almost certainly going to lose the two Aces and another Heart. So I pull trump, ending in Dummy and lead the Jack of Hearts. Queen, King, Void. Now I know that East is sitting in a tenace position with her Ace-Nine surrounding Dummy's Ten. As defined in my 16-page Glossary in The Complete Idiot's Guide to Bridge, the most complete Glossary of bridge terms ever published and all by itself worth the price of the book, a "tenace position" is when "there is only one card outstanding remaining between a holding of two cards." In this situation, the only card remaining outstanding between her Ace and Nine is dummy's Ten because the King, Queen, and Jack have already been played.
How can I avoid losing two Hearts? The answer is that with good, or just adequate, defense, I can't. So the only thing to do now is to give her the opportunity to make a mistake. If I lead from my hand to the Ten, she'll take it with her Ace and then her Nine will be the highest remaining Heart and she'll take that trick eventually since I will still have a Heart to lose in both dummy and my hand, even if she doesn't realize it's good. So in order to give her the best opportunity to mess up, I have to lead from the board to my unseen hand.
The first thing I do is to draw her attention away from the Heart trick that has just been played that got rid of the King, Queen, and Jack of Hearts. So I lead the Ace and King of Diamonds and ruff a Diamond, leaving me on the board with the following position (North's holding is irrelevant):
I'm hoping she is inattentive enough to not realize that her Ace and Nine are both good tricks with the Ten on the board. I lead the board's Two to my Eight. If she plays her Nine she'll win the trick and I'll lose the two Heart tricks. But if she forgets that all the cards between her Nine and her Ace have already been played except the Board's Ten that I led away from, she might think that I'm going to win the trick in my hand if she doesn't take it with her Ace.
She doesn't even hesitate, going up and taking the Ace. That leaves my Ten on the board as my 11th trick. I gave her a chance to make a mistake and she made it. The result was that we got a top Board. Several pairs bid and made Four Spades. One was down one in Four Spades. One played Five Hearts our way down three. We were the only pair in Clubs.
The moral is, never give up. If it looks hopeless but there's a chance that opponents will misplay, give them that chance.