Home On The Rails: The gold prospector kills himself by laying down on the railroad tracks when an encroaching railroad means he can't pan for gold anymore.
In Batman Beyond, Mr. Freeze, having returned to his villainous ways following an attempted return to a normal life, lets himself be killed by an explosion rather than be saved by Batman. He had already been pretty badly injured by Blight, but his choice was more out of despair than any sense of inevitability. When Batman screams at him to run, telling him he'll be killed, Freeze tells him, "Believe me, you're the only one who cares."
In an episode, one of Francine's friends sinks into a deep depression and Roger (disguised as a psychologist) offers this "helpful" advice: "You should totally kill yourself."
When Stan's obsession with winning leads to him cutting Steve from the school football team, Steve and Roger team up to ruin the teams perfect season so Stan will know what it feels like to lose. However, Stan turns out to be so incapable of dealing with losing that his first reaction is to commit suicide. Twice (the second time is when he loses at a carnival game. Steve ends up having to coach Stan through the feeling of losing and make him realize it's not the end of the world.
In yet another episode, this is actually Played for Laughs, believe it or not; Stan gets a call from Steve's principal. He immediately jumps to the wrong conclusion:
Stan: "Oh, god, it's the gay call! I've been dreading this for years!" (begins powering an entire bottle of pills) "...Oh, he's just barricaded himself in your office and won't leave?" (his mouth begins to froth; he glances offscreen) "Dave! Antidote!"
In a season 8 episode he actually goes through with it, shooting himself in the head with an antique revolver. Fortunately for Stan and others, the episode isn't canon, it's actually a play being performed by the cast in-universe (apparently written by one of the staff writers on a massive cocaine bender before he O'D'd. He actually wrote 12 more, but apparently Patrick Stewart ate them all in a fit of jealousy).
In another season 8 episode ("The Adventures of Twill Ongenbone and His Boy Jabari"), Steve's teacher Mr. Brink decides to jump out of the window after hearing one of Stan's monologues about wanting to kill himself.
Another episode has Klaus look at the camera and tell an aquintance to kill himself because of how cliche and formulaic his life is.
Klaus: Your life has been lived a thousand times! Kill yourself!
A Running Gag is that the bartender Moe frequently attempts suicide. It's his holiday tradition. He's usually accidentally saved.
Frank Grimes, sadly, wasn't so lucky. Although with Frank it wasn't so much "driven to suicide" as "driven stark raving bonkers and unable to recognize that yes, electricity does kill you if you approach it the wrong way".
Themes of suicide have been seen as far back as Season 1, and it came with the third episode, "Homer's Odyssey." After he is fired from his job at the Springfield Nuclear Power Plant – one of multiple times he's lost his job there – Homer is unable to find a new job and, believing his life to be worthless, decides to jump off a bridge and end it all. His family saves him in time.
In the episode where Apu is fired from his job at the Kwik-E-Mart by a group of executives for violating the Health Code, he tries to commit suicide by eating one of the store's hot dogs. He has to be restrained by the same executives who fired him, who start pleading with him that it isn't worth it.
The episode where the Simpsons had 25 puppies subverted this. When it turned out that the Simpsons' dogs were world champions and had earned Mr Burns millions after he adopts them for free, we see what looks to be Homer hanging himself. Marge is horrified, only for the scene to show he was just batting a lightbulb while hanging by his arm on the rafters.
Homer: Marge, you know batting this lightbulb is the only thing that cheers me up after losing those million-dollar Greyhounds! *the bulb hits Homer in the head, causing him to lose his grip and fall off*
Similarly, in an episode parodying 24, driven to guilt from acting as Jimbo's inside man Martin gets on a stool and is seen hanging when he knocks it over. A pull back of the camera shows he just wedgied himself.
In "Lisa's Sax", a five-year-old Bart is having a very rough time in school and draws a crude picture of himself impaled with a knife with "blood" trickling down.
In the infamous episode "The Boys of Bummer", Bart gets harassed by everyone in town when he causes his team to lose the Little League championshp and because of it, goes crazy and jumps from the town's water tower. He survives.
In "Million Dollar Abie", Homer's dad inadvertently ruins the town's shot at getting their own football team, causing him to become a depressed pariah. His friends then recommend assisted suicide (which is a parody of the Home process from Soylent Green), but the law allowing it is overturned before he can go through with it. He gets better.
In "No Loan Again, Naturally", when it looks like the Simpsons are going to move away when the house is put up for auction, Homer attempts to hang himself from a tree. His weight ends up taking the tree down, and to add insult to injury, the tree smashes his car.
Dinobot in Transformers: Beast Wars is seen in his quarters, early in the episode "Code Of Hero", overcome by dishonor and holding his sword at his chest before tossing it aside in disgust. Some fans view his Heroic Sacrifice later in the episode as suicide, given the odds stacked against him and the fact that the other Maximals were already on their way. There's no clear answer here.
"Something Wal-Mart This Way Comes": The owner of the local Wal-Mart faces an angry mob of townspeople fed up with its influence, nervously going back and forth between lauding its qualities and expressing his own negative yet defeated opinion of it. During the conversation he writes and shows a note telling the crowd to meet him outside. After then townspeople leave the office confused and disappointed, the owner suddenly jumps through the window, hanging by a noose. Seconds later, he craps his pants, proving Cartman right about the phenomenon to his satisfaction. The same thing happens later with the founder of Wal-Mart, who shoots himself. And then craps his pants.
"Britney's New Look": Britney Spears blows her head off... and lives. So, the cult which apparently everybody in the country belongs to, decides they need to try harder. "It's gonna be a goooood harvest." The episode is a parody of The Lottery, comparing the books sacrifices to how the U.S builds up and then tears down celebrities.
"Night Of The Living Homeless": A man tries "to take the easy way out" by shooting himself. He shoots himself over and over again, destroying his body further, but not dying. This is also an example of Crossing the Line Twice.
"Elementary School Musical": Cartman tries to kill himself after watching the latest "cool" movie, High School Musical. Unfortunately, his mom drives a hybrid car, which doesn't produce enough carbon monoxide to do the job.
"Cash For Gold": After discovering how his vulnerable, Alzheimer's-stricken grandfather was being screwed over, Stan repeatedly tells the host of a home shopping network to kill himself in an epic case of Deadpan Snark. He finally does it, after getting the same calls from his former clients.
In "Coon vs. Coon and Friends", Kenny/Mysterion attempts to goad Cthulhu into either removing his curse of immortality or simply killing him once and for all. After a particularly irksome situation where a mysterious stranger behind a CGI portal gives a speech about powers, destiny, an extraterrestial origin etc. only to find out he's talking about Mintberry Crunch, who then disappears along with Cthulhu and Cartman, Mysterion goes back to headquarters/Cartman's basement after Mintberry Crunch saves the world. There, he tells his gleeful superhero buddies that he wants to "take a nap" then promptly shoots himself. For the third time in the trilogy.
Subverted. Neil pretends to be about to jump off of a building, but later he tells Meg that he wasn't going to jump, regardless of whether she tried to stop him.
In the episode "Brian Wallows and Peter's Swallows", Brian regrets yelling at Pearl after he learns of her ill-fated singing career. He rushes to her house to apologize, only to find her about to hang herself. Luckily, he manages to stop her in time.
Stewie decided to kill himself over his fear of the cover of Queen's News of the World album, getting as far as putting the gun in his mouth before Brian slapped it away.
Subverted in "Believe It or Not, Joe's Walking on Air". When the women decided to make the Drunken Clam their new hangout spot, Peter takes Joe's gun and shoots himself in the mouth. It turned out to be one of his "Scrubs fantasy moments".
In the episode "Lois Comes Out of Her Shell" Meg tries to kill herself by overdosing on sleeping pills, but Stewie's homicidal pet turtle replaces them with Alka-Seltzer tablets, so instead of dying she lets out a long burp.
Parodied in one episode where Lois tells Meg that "it doesnt matter how many signatures a Facebook petition has, it doesn't mean you have to kill yourself".
The trilogy segment "Point Of Stew" has Meg tell Stewie to keep her treasured ring with him in a despondent, miserable voice.
Stewie: *freaked out* Okay, red flag, red flag everybody!
After Brian explaining death to him, and following it up with his belief that there is no afterlife, Stewie becomes despondent and decides to just end it all. First by Electrified Bathtub, but this fails when the toaster he used just ended up giving him superpowers as "Toasterman". He then tries comitting Suicide by Cop, but the cop turns out to be Joe, who is also suicidal and tries to get Stewie to shoot him. Finally, he attempts to just Ate His Gun, but is stopped by Brian.
At the end of "In Harmony's Way", Peter talks about how happy he is to be home with his family after his and Quagmires singing career fell apart, and how "life after fame is always better than before". He then goes straight into his tour bus and shoots himself.
When fighting one of the Winged Monkeys in The Wizard of Oz, The Crow gives him a depressingly nihilistic monologue that causes the monkey to just hang himself. Cue Crow wiping away a tear.
The bloopers show host kills himself at the end of every segment he's in. During the infamous "The Rescue" sketch, the titular Robot Chicken interrupts his suicide. The host concludes that if someone had the heart to save him, his life must have meaning after all. Then the chicken crushes his skull.
The final Bloopers sketch actually has the suicide fail because the hosts pregnant, 13-year old daughter refused to help him commit seppuku. It then turns out that there's no one in the studio, and the Host has just been imagining the audience reaction the whole time.
The episode "Moesha Poppins" had a Where Are They Now-type sketch concerning girl toys where Venus de Milo, the fifth female turtle from Ninja Turtles: The Next Mutation, was so devastated by her lack of popularity that she killed herself by drowning herself in the toilet.
"How Hermes Requisitioned His Groove Back": Hermes threatens to jump off the Planet Express balcony after being demoted by the Central Bureaucracy. However since he didn't file the proper Suicide papers, doing so would have caused him to be demoted even further.
"Overclockwise": Fry decides, after Farnsworth gets arrested and Leela decides to leave Planet Express and move to another planet, to kill himself by jumping down Niagra Falls in a barrel. It doesn't quite work, as it turns out.
In Bender's Big Score, a time-traveling Bender mistakes a phone booth for a suicide booth. He asks for "Electrocution, please. Side order of poison." (Neither of which are deadly to robots!)
Serious example: feeling Survivor Guilt in "The Sting" for the death of Fry, Leela decides after a long string of Mind Screws and It Was All Just A Dream that the only way to keep her sanity in check for good is to eat enough space honey to fall into a permanent sleep. Thankfully the whole ordeal was just Adventures In Coma Land and she comes back to reality afterwards, the Fry she was envisioning being the real Fry sitting at her bedside, pleading for her to wake up.
In the final episode, "Meanwhile", Fry proposes to Leela, and tells her to meet him on the roof of the Vampire State Building at 6:30 if she accepts. When she doesn't show up, Fry decides to kill himself and jumps off the roof... only to see Leela arriving: Fry had been fooling around with the Professor's latest invention, a button that rewinds time by ten seconds, which had caused his watch to run late (as it ran normally despite the rewinding of time), and tries to reset time to before he jumped before he hits the ground. Problem is, he'd been falling for more than 10 seconds! Fry falls to his death several times before his suicide is ultimately prevented.
In Chuck Jones' "Cheese Chasers", a pair of mice decide to commit suicide-by-cat after having eaten themselves sick on cheese and decide that there's nothing left to live for since they'll never be able to enjoy cheese again. They only succeed in driving the cat to suicide as well. The dog being provoked to kill the cat tries to find logic in the scenario, but he ends up snapping and chasing after the local city dog catcher.
Dog: HEY! WAIT FOR ME! WAIT FOR BABY! Cat: Hey, wait for me! You gotta massacre me! Mice: Wait, you cowardly cat!
In "Martian Through Georgia", an alien bored and unhappy with his home planet's near-utopian society decides to visit Earth for a change of pace. When he realizes the Earthlings hate and fear him as an invading "monster", the alien is so distraught he briefly contemplates suicide (in a scene usually cut in syndication).
Sylvester's first appearance in the cartoon "Life With Feathers" is brought on by a suicidal lovebird, who (like Hubie and Bertie) wants to be eaten when his "Sweetie Puss" kicks him out of the nest. He figures that, as a lovebird, life is pointless without love, so Sylvester eating him is the logical choice. Sly, however, thinks the bird is poisoned and refuses, leading the bird to try and force Sylvester to eat him.
In one Pepe Le Pew cartoon, Penelope locks herself in a glass case so he can't get at her. When Pepe asks her why, she replies because he stinks. Shocked at this revelation, Pepe takes out a gun, waves good-bye to Penelope and walks offscreen before a gunshot is heard. Frantic, Penelope leaves to case to check on him...and finds Pepe waiting for her on the other side.
There's one episode—"Blue Cat Blues"—in which a Jerry voiceover details Tom's slip from love into debt, drink, and finally, a long wait on the train tracks. At the end of the episode, Jerry's girlfriend leaves him, so he joins Tom.
In another, the young duck tries to get Tom to eat him because he's "ugly."
Bill Dauterive of King of the Hill had periodic bouts with depression turn so bad that he became suicidal especially on Christmas because that was when his wife divorced him. Bill's suicide attempts were played seriously, but his neighbors' reactions to it were not. Hank was annoyed by having to take time off of work to go on "suicide watch", Dale didn't care if Bill died or not and was eager to steal his stuff, and Boomhauer was tired of it eating up so much of his time.
The Pluto short Plutopia has Pluto's cat servant pointing a shotgun to his head after he spills Pluto's milk, causing Pluto to slap it out of his hand. It was All Just a Dream.
In the Walt Disney Presents episode "The Goofy Success Story", Goofy nearly throws himself into the sea after getting snubbed at the Oscars.
The House of Mouse episode "Dennis the Duck" focuses on the eponymous black-and-white duck character, who idolizes Donald Duck and dreams of being as funny as him. Donald spends most of the episode pushing Dennis away, prompting Dennis to conclude that if he isn't funny, there's no point in living. He then erases himself with a pencil eraser, but a repentant Donald arrives just in time and re-draws him before convincing him that his signature sandwich gag really is funny.
Though it's not called suicide, nor is death even alluded, the Wonderful Life episode of The Fairly OddParents! had Timmy eventually concluding that, since everyone's apparently happy in the world where he was never born, he should forfeit his own right to exist. For clarity, this is a ten-year-old boy who comes to the depressed conclusion that he only causes misery in others so he should just accept being erased from existence. Sure, it's all a Secret Test of Character, but the realization needed to "pass" the test was, for all intents and purposes, "my suicide will make everyone else happy." It's one of two episodes which the showrunners requested not be rerun due to the negative viewer reaction.
The controversial episode "One Course Meal" features a notorious scene in which Plankton lies in the road in an attempt to get run over when Mr. Krabs's "Knight Templar" tendencies go too far.
In "Something Smells," Spongebob's rancid onion breath cases his own reflection to smash itself and two nearby fish to grab onto a fishing hook and get reeled up.
In the episode "Are You Happy Now?" when Squidward goes into a depression he sticks his head in the oven but is really taking brownies out. In another part he throws a rope with a loop in the end over the ceiling but is really hoisting up a bird cage.
In "Dunces and Dragons" a guard turns his spear on himself but decides not to, saying "Someday, but not today".
The Big Bad of Season 1, Nox in Wakfu, after he finds that even after slaughtering countless creatures for 200 years to power magic beyond the power of gods, even after performing said magic, that was said to most likely destroy the universe even if it worked at all, perfectly as intended, and travelling back in time, so that he can save his family... all the reserves of power he stored in 200 years, allowed him to rewind time for only 20 minutes, meaning that both his family and victims of all but the latest of his genocides will stay dead. After that he just lies on the graves of his wife and children and lets the magic that kept him alive go, turning to dust and leaving only his armor and bandages behind.
In Samurai Jack, Jack meets a Viking king who was defeated by Aku years ago and cursed with immortality in the body of a rock monster. Tired of his years of suffering, the warrior is desprerate to be killed by a Worthy Opponent. Jack eventually grants the warrior his fate.
It's also very heavily implied that Korra is contemplating it at the end of the season with her crying and looking over the edge of a cliff.
In a far more humourous use of the trope, Jinora tells a tale of a princess who discovered she could not be with her one true love, and so rode into battle on a dragon, burned down an entire country before jumping into a volcano. She feels this is the best way for Korra to deal with her own crush.
At the beginning of Book Three, Harmonic Convergence has granted airbending powers to a considerable number of nonbenders. One of them, distressed at the way his out-of-control powers keep causing harm to those around him, flees to the top of Kyoshi Bridge and is obviously on the point of jumping. Korra comes up and talks him out of it.
In Book Four, Varrick blows up his lab with a spirit energy bomb, intending to be inside when it goes off. (He wants to blow up the lab to keep Kuvira from acquiring spirit energy weapons, and he means to go down with the ship because Zhu Li betrayed him.) He doesn't seem to mind at all when Bolin rescues him, though.
It can be inferred from the final scenes between Korra and Asami in the finale that Korra's death may be the catalyst for Asami to consider this. As Asami states, "I'm just so happy you're here now. I just don't think I could have handled losing you and my father in the same day," during the aftermath of Varrick and Zhu Li's wedding. From Asami's talk with Korra, it is subtly implicated that, had Korra died fighting Kuvira, she would have likely lost all will to live, and we all know what that could lead to...
In the episode "Princess Cookie", this happens to a (male) cookie who realized he couldn't be a princess. The cookie held hostages to obtain the crown from Princess Bubblegum, which caused him to get in trouble. She sent guards after him, and rather than getting caught, he decided to purposefully and blissfully fall off a cliff. He got better.
In "Dad's Dungeon," Finn tries to eat a poisoned apple after he becomes convinced that his adopted dad Joshua hated him and thought he was a sissy.
Princess Monster Wife, arguably. However, her death was a Heroic Suicide; she killed herself by giving her parts back to the princesses from which the Ice King had stolen them.
One episode has Princess Bubblegum state that she keeps cyanide pills underneath her table, presumably in case of a worst case scenario.
A weird example occurs when Orel attempts this twice, not out of any sort of depression, but because an accidental near death experience had him convinced that God is trying to communicate with him, so he attempts suicide to have more near-death experiences. The last one led to his gnostic revelation that one does not need a church to worship God. Unfortunately, the revelation is literally beaten out of him.
For a Suicide as Comedy example, Orel sees a guy jump off a bridge, only to discover the lake is only knee deep. He's then arrested cause suicide is a federal offense in Moralton.
In the Polish short A Gentle Spirit, a young woman ran from her husband and jumped out the window.
In The Flintstones episode "Little Bamm-Bamm", when it seems like the Rubbles will not be able to keep Bamm-Bamm, Barney gets ready to do this by tying himself to a boulder and dropping himself in the river. However, when the case is dropped and the Rubbles are allowed to keep Bamm-Bamm, Fred and the others go to stop him just in time. Barney then gives the boulder to Fred, causing him to fall off (lucky for him, the river was shallow).
In the Jem episode "A Change Of Heart", Minx nearly drowns and the experience causes her to change her personality. Her bandmates can't stand how she isn't her confident, arrogant self anymore and kick her out. She turns to Rio when she has nowhere to go but he states he has his own life to live, which upsets her. Saying she has nothing to live for, Minx tries to jump off a building but is stopped by Rio. Later in the same episode it appears she's going to attempt suicide, but she really just throws one of Rio's instruments off the building in anger and goes back to The Stingers.
An episode involved Ginger writing a poem called "And She Was Gone" that the adults at school infer is about suicide. They get worried about her mental health and, despite Ginger insisting that it is just fiction and that she is perfectly fine, she is sent to the school psychologist.
A Show Within a Show involved a woman jumping out a window, at her daughter's birthday of all things, because she was dumped. It's later shown she survived though.
In the Beany and Cecil episode "Ben Hare" a program on tv is shown about a famous rabbit and his many sons, eventually the stork is so tired of delivering the baby rabbits that he shoots himself, his dead body is then shown smiling.
In the My Little Pony: Friendship Is Magic episode "No Second Prances", a very distraught Trixie Lulamoon attempts to perform a dangerous magic trick involving launching herself into a manticore's mouth alone. Her assistant Starlight Glimmer would have teleported her to safety, but Starlight learned the only reason that Trixie acted nicely towards her was so that Trixie could one-up Twilight Sparkle. Even worse, when Trixie reveals that she genuinely likes Starlight, she makes the mistake of adding in that "beating Twilight Sparkle is just a bonus!", which only angers Starlight more. Thankfully, Twilight is able to convince Starlight to help Trixie just in time to make the stunt go off without a hitch. While Word of God has confirmed that Trixie going on with the show was not a suicide attempt — there are a few subtle cues in the episode that make it clear Trixie's life wasn't in danger — it was still enough for it to be a popular fanon due to Trixie's Friendless Background.
During his short film days, Casper the Friendly Ghost had attempted to do this every so often, only to get not harmed at all, the good-hearted latter being already a ghost.
There was that one time in Aqua Teen Hunger Force where Shake killed himself in an over-the-top fashion just so he could haunt Meatwad's video game. And another time where he attempts it because he's disappointed over his supposed son Ezekial's lack of sports skills. Carl was pissed because Shake was using his car to kill himself.
In Winx Club, Nebula decides to stay in the Omega Dimension as it crumbles into nothingness, believing that her quest for vengeance has corrupted her irretrievably. Layla, too, wants to die in the Omega Dimension, ashamed at turning on her friends and filled with misery over Nabu's death. Bloom convinces them to leave, though.
In the episode "Shirt Club", when Steven asks the Gems to help him stop some t-shirts from being distributed, they (incorrectly) assume the shirts are dangerous and start making various guesses as to what the threat is. This culminates in Pearl guessing that the shirts cause their wearers to lose the will to live, "thereby shutting down Beach City" via mass suicide.
In the episode "Buddy's Book", Buddy sticks his head in a lion's mouth and tells it to go ahead and eat him.
At the end of the Rick and Morty episode "Auto Erotic Assimilation", after being dumped by Unity, Rick becomes so depressed that he attempts to disintegrate himself with a laser, but passes out just before it activates.
By the end of season 3 of BoJack Horseman, pretty much everyone in BoJack's life has either abandoned him or BoJack himself has pushed them away: he fired his agent after losing two possible movie roles, Todd is no longer speaking to him after he reveals he slept with his ex-girlfriend, and he attempts to tape a new reboot of Horsin' Around, the sitcom he loved doing, only to succumb to the pressure. In the very end, to the accompaniment of Nina Simone's interpretation of Janis Ian's "Stars", he is driving his Tesla out in the desert at top speed, with the intention of killing himself, but stops when he sees some wild horses running.