What to do in lost positions?
From time to time you will find yourself in a lost position. Most of those times you will also lose the game, but there are often ways to try and fight back and swindle your opponent.
Let's look at an example:
White could have played much better, yes, but if you try your best to generate counterplay on every move and keep things complicated there are always the chance of a table-flipping blunder.
Here is another example of a swindle that I call "Trusting the opponent too much". This is the very last thing you might try if everything else failed:
After the game I asked my opponent "How could you accept that repetition?" He answered: "I thought I couldn't let you take on f7".
I previously had 3/3 wins against this opponent, so my psycological plus might've taken it's toll. Maybe he thought: "Would he do that if it's a blunder?? I don't see it, but I don't want to lose this game. I might as well accept the draw."
The lost position was reached 10-15 moves back. I tried generating counter-play as much as I could but he solidified very well reaching the starting position of the example. That's why I tried this "last resort"-option.
When you are lost, try to keep as much material as you can on the board. Find your sources of counter-play and start using it as fast as you can. After you did everything you can to create counterplay but your opponent just got a better and better position you can try some "last resort"-options. Often that is to sacrifice a piece or pawn to get some sort of counterplay with the tiny chance of a blunder. Although it "never" works, noone ever drew or won a game by resigning.
However, once there is no counterplay and not even a complicating sacrifice to make you should resign as quickly as possible. Think etiquette. Some coaches even say you should resign much sooner, because playing lost positions is not good for your motivation. I think the correct answer lays somewhere inbetween. If you have a passed pawn, try to force it forward until it's completely stopped. If he has a weak back rank, play until he can safely fix it.
Playing lost positions forces you to detect hidden threats. This can help you to detect the same threats later when you have an equal position against someone else.