I realize that there is no point in playing good chess if you end up blundering away a rook or a bishop. I end up blundering atleast once in two games which generally ends up with me resigning due to frustration. For eg., in a recent game, my opponent took my pawn with his bishop and I took another of his pawns in return. However, I didn't realize that after taking my pawn, he was also threatening my rook. Thus I blundered away my rook. Is there any technique to avoid making such blunders?
Playing good chess is still totally worth it. It's much easier to blunder in a deseprate position than in a good one. That being said, the main path towards stopping blunders is improving your tactical skills so you can detect threats more easily.
With enough time on the clock, you should always look for forced moves both you and your opponent may have (checks, captures, mate threats...) There's probably a reason for your opponent's last moves, so think of what new threats it creates.