Don't Give Up !
Sometimes when we are playing we lose focus and drop a piece or make a weak move which may prompt you to resign, but some of the most enjoyable and interesting chess I have played comes after I have ruined a game.
There may be compensation for a lost piece that you do not see immediately and can be exploited. Your opponent may equally lose focus having "won" and allow you to equalize. Make your opponent earn the win! Snatching victory from the jaws of defeat can be a lot of fun.