Simpsons, 'Treehouse of Horror XI'

A world where Homer dies by choking on broccoli and must do at least one good deed to earn his way past St. Peter and into Heaven. He manages to accomplish his good deed but St. Peter wasn't paying attention and Homer winds up in Hell.