glückschmerz
Displeasure at someone else’s good fortune.
In a sentence
“There was a trace of glückschmerz in my reaction to the boastful runner’s lucky win.”
Change one detail
glückschmerz
A coworker who cut corners on every project wins a bonus. Their good luck leaves a sour taste.
Often stronger when the good fortune seems undeserved.
schadenfreude
The same coworker loses the bonus at the last minute, and you feel a private flicker of pleasure.
A setback, rather than good fortune, turns the displeasure into pleasure.
Read the entry for schadenfreude