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, "Trust 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."
In another episode Stan is so incapable of dealing with losing that he immediately attempts to kill himself. Twice.
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.
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.
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, 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.
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, 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."
"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.
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.
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.
"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.
"Less Than Hero" (Subversion): Fry and Leela, having gained superpowers earlier in the episode, are in the Mayor's office when he's trying to summon their superheroic alter egos. After Leela and Bender make up excuses to leave, Fry just yells, "And I just can't take life anymore!" and leaps out the window.
"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 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.
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).
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.
In "Donald's Dilemma", Daisy admits to being driven to suicide when a blow to the head causes Donald to leave her to become a singer.
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.
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."
There was an episode involving Plankton attempting suicide due to Mr. Krabs's "Knight Templar" tendencies. After an unsuccessful attempt he actually said "Can't you see I'm trying to get run over?" to Spongebob. This... is a kid's show... right?
Spongebob's bad breath made his reflection commit suicide by smashing the mirror with a hammer. In the same episode there are two fish who bite on a fishing hook to 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.
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.
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 she has cyanide pills underneath her table, presumably in case of a worst case scenario
An odd example in Moral Orel 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.
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 it is just fiction and 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 mantacore's mouth after her assistant, Starlight Glimmer, who would have teleported her to safety, learned the only reason she accepted being her friend was so that she 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 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.
In the first Felix the Cat short Feline Follies, Felix (than known as "Master Tom") gases himself after learning his girlfriend Kitty White has had over a dozen kittens.
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 not son Ezekial's lack of sports skills. Carl was pissed cause Shake was using his car to kill himself in.