Chess is a mind game; your emotions affect your moves. After a mistake take a deep breath: the game isn't over yet, and if you stay calm you can save it.
Be careful when winning too: won games are most often lost through relaxing. Keep checking your opponent's threats on every move.
Take a break after several losses in a row. Playing tired and angry costs rating points; solve a puzzle or watch a lesson instead.