If we're talking about messed-up moments in The Simpsons, we absolutely have to talk about the sad life and death of Frank Grimes in "Homer's Enemy." Frank Grimes is a brilliant hard-working man, who becomes incensed upon meeting Homer Simpson, who is proof there's no such thing as meritocracy. When Grimes' tragic life is highlighted in the local news, Mr. Burns hires him on the spot, only to replace him with a dog who's story is highlighted on the next day's local news.
Despite Homer's best (well, if we're being fair, lazy) efforts at befriending Grimes, his very existence is anathema to what Grimes has spent his whole life believing. Homer waltzes through life with a patient wife, three good(-ish) kids, and a ridiculous resume of amazing jobs while Grimes lives alone in an apartment between two bowling alleys. It eventually drives him insane, so much so he runs around the plant mimicking Homer and eventually electrocuting himself to death.
Even at the funeral, Homer takes attention away, leaving Grimes to be lowered into the earth, unloved and forgotten. There's plenty of messed-up moments, but nothing beats a fundamentally good man going insane at the realization that hard work benefits no one on The Simpsons.