Unhappy people engage in social comparison a lot. They are more attuned to their status compared to others and worry more about how they are doing. And their moods are more affected by information about their status.
Happy people's views of themselves are based on more stable internal standards they hold. If they meet their own internal standards, then they are happy. If they don’t, they are less happy, but go into action either to make themselves feel better or to improve their future performance.