It happens to everybody. You have played a brilliant game and you throw away hours of hard work on one monumentally stupid move. It even famously happened to World Champion Vladimir Kramnik when he allowed a mate in 1 in his match against the computer program Fritz. It would be nice to know how to avoid such game killing errors. Perhaps if I knew the trick to it, I could have avoided the disaster I am about to show you.
This is a USCF game. My opponent is rated about 1750, so we should be evenly matched. Coming out of the opening I gained control of the center and got much better piece activity. This turned into a protected passed pawn, a rook on the seventh, a material advantage and then a disaster. Have a look: