Sportsmanship

Shaking hands after a tennis match is considered a symbol of good sportsmanship.
Patting on the back sometimes occurs before the game like this one from the Philippine Basketball Association.
These two teams of young football (soccer) players line up and high-five after a game to practice good sportsmanship.

Sportsmanship is an ethos that a sport or activity should be enjoyed for its own sake, with proper consideration for fairness, ethics, respect, and a sense of fellowship with competitors.

A "sore loser" refers to one who takes defeat poorly, whereas a "good sport" means being a "good winner" as well as being a "good loser".