I think I've read a number of times that "Second place is the first loser", and that third placers tend to be 'happier' than second in the short term. Second means one was so close to winning it all, but fell short. Third is just happy to get a medal/reward/recognition. For me though, I look at myself and my skills objectively. I determine if I even have a shot at winning and set my expectations from there. I was good enough in Badminton and I think I can hang with the other good players. But since I don't do enough training and practice, I know I can't win national tournaments, or even represent in the Olympics.
I am very competitive, so I even treat regular matches very seriously. When I lose, I work on the weaknesses I had and try to improve them for next time. I would look at how other play, what I am doing differently, and if I need to change anything. Getting better at something is part of the fun of the sport.