Eternal Moonshine of the Simpson Mind is the ninth episode of Season 19. It first aired on December 16, 2007. The episode was written by J. Stewart Burns and directed by Chuck Sheetz. Homer wakes up to find himself outdoors and covered in snow, without memory of the night before. When he arrives home, he finds everyone missing. Seeking help from Moe and Professor Frink, Homer tries to piece together his memory to find out what happened to him.
During winter, Homer wakes up in a pile of snow and does not remember the events of the previous day, commenting that he must have drunk heavily the night before. Homer goes home and finds his family missing. Santa's Little Helper attacks him. Homer goes to Moe's Tavern, where Moe informs him that he was there the night before and wanted to forget something. Moe explains he gave Homer a "Forget-Me-Shot," which wiped out the last 24 hours of his memory. Chief Wiggum appears and tells Homer that there was a domestic disturbance at his house last night, which was reported by Ned Flanders. Homer instantly receives a flashback to the night before showing Wiggum questioning Marge about a black eye she had received, to which Marge nervously replies that she walked into a door.
A still confused Homer goes home, where a picture of Marge causes a flashback of her pleading with Homer to stop, and then rubbing her eye in pain. Horrified, Homer goes to Grampa Simpson for help. Grampa tells Homer about Professor Frink's new machine that helps people sort through their memories. With the help of this incredibly painful technology, Homer sees himself walking in on Marge and Duffman. When Marge tells Homer she did not want him to find out about it, Homer assumes that Marge was cheating on him. He gets Bart and Lisa to help him. Bart convinces him to take him back to when Homer was 10 to see if he could beat him up. Homer agrees. When Bart beats up 10-year-old Homer, Homer says,"Let's see how you fair against 20-year-old Homer!" When Bart beats up 20-year-old Homer, the real Homer strangles him. He gets brain damage and loses his memory of his first kiss. Bart takes advantage of this and tells him it was with Apu.
Homer now considers his life to be worthless and goes to jump off a bridge. When he decides not to, Patty and Selma push him anyway. While falling, Homer's life flashes before his eyes (as a YouTube video), and he sees the full memory of the previous night. It is revealed that Marge was planning a surprise party for Homer finishing his community service, and did not want Homer to find out about it. Duffman, who was hired by Marge to entertain at the party, brings out a bottle of Duff Champagne. Overjoyed, Homer tries to open the bottle, while Marge pleads with Homer to stop, as she wants to save it for the party. The bottlecap flies off the bottle and hits Marge in the eye, Duffman then hands Marge and icepack saying she's going to be sore tomorrow. The flashback ends and, instead of falling to his death, Homer lands on a moon bounce, which is at the surprise party on board a ship.
When Homer questions why Marge lied to Chief Wiggum, she says that she did not want him at the party, because she knew he would bring Sarah Wiggum, who Marge is not very fond of. Lenny and Carl appear and cause a flashback which shows Homer telling his bar buddies that he felt very guilty for finding out about the party that Marge worked so hard on. When Moe offers Homer the Forget-Me-Shot, Carl and Lenny begin to insult him, as he won't remember any of it. Homer then predicts exactly what is going to happen, and tells Lenny to make sure there is a moon bounce at the party. The present Homer says he is a genius. Finally, when Homer wonders why the dog attacked him, Bart replies, "You never feed him, walk him, or let him out to pee."