Eternal Moonshine of the Simpson Mind is the ninth episode of Season 19.
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, discovers that his family missing and Santa's Little Helper attacks him. Then Homer goes to Moe's Tavern and is informed by Moe 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 another man. When Marge tells Homer she did not want him to find out about it, Homer assumes that Marge was cheating on him. However there is a bottle in the way soon Homer can not see the man's face. In order to find the other man's identity, 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 accidentally destroys his memory of his first kiss. Bart takes advantage of this and tells him it was with Apu (this is probably corrected by Lisa off-screen afterwards). Homer then takes Lisa and Bart to his memory of Marge with another man. Lisa suggests Homer move the bottle. He tries and is unsuccessful. Homer, Bart and Lisa kick the memory around to get it to move and the other man with Marge is revealed to be Duffman. The Homer in the memory makes the real Homer think Marge the mother of his children is cheating on him "The reason for his children." Duffman says "She's [[[Marge]]] going to be sore tomorrow".
Homer, heartbroken, now considers his life to be worthless and goes to jump off a bridge. When he chooses not to, Patty and Selma arrive and 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 because he had finished his community service, and did not want Homer to find out about it. And that Duffman was there because he was hired by Marge to entertain at the party. He 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 bottle cap flies off the bottle and hits Marge in the eye, giving her the black eye. Duffman then hands Marge and ice pack saying "She's going to be sore tomorrow." The flashback ends and Homer is overjoyed that Marge wasn't cheating on him and that he didn't hurt her. He is also happy that his family is throwing him a party. Then he realizes he's falling to his death. Suddenly, instead of drowning in ice cold water, Homer lands on a moon bounce, which is at the surprise party on board a ship which on a boat. Marge and the other Springfield citizens on the boat welcome him to the party.
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 tell Homer his plan to make the party a Surprise again worked. This causes 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 and that he wants to be surprised about it. When Moe offers Homer the Forget-Me-Shot, Carl and Lenny begin to confess things to him, as he won't remember any of it. Homer then that says after he drinks his Forget-Me-Shot and wakes up the next morning, he might retain some images of coming home to find Marge with Duffman and take them out of context and want to jump off a bridge and tells Lenny to make sure there is a moon bounce at the party. After the flashback ends, The present Homer says he is a genius. Finally, when Homer asks why the dog attacked him, Bart replies, "You never feed him, walk him, or let him out to pee."
At the party, Homer chooses not to drink, stating he would rather remember this evening.