Counterfactual Thinking: is when you imagine different outcomes or endings that might have happened.
I feel that I have experienced this many times. For example, if I do poorly on a test my mind instantly goes back to some of those questions that I was unsure on and I think, “Well maybe if I would have put the other answer down I would have scored better.” Sometimes I will catch myself continually looking back at things like how could I have handled that differently, what if I would have chosen to go this way, or maybe I would have liked that other job. I never knew that there was an actual name to this type of thinking.
The text uses an example of Olympic athletes and how one who receives a bronze medal may be more positive if in his mind he had pictured leaving without a medal, as opposed to someone who won a silver medal and pictured themselves winning a gold medal.