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.
In the Happy Tree Friends episode "Wishy Washy", Petunia gets covered in dirt and due to her Super OCD, she goes crazy and tries to find a way to clean off the dirt. But all the waterworks in her house were messed up before she lost it. When all the water she gets is dirty she resorts to finding something to scrub off the dirt. The last thing she gets is a potato peeler. She then peels off her own skin. Wow.
In an episode of American Dad!, 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.
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.
The Simpsons sometimes has the bartender Moe attempt 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 staring bonkers and unable to recognise 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.
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 "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 in Family Guy: 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.
The members of Dethklok in Metalocalypse jokingly tell someone to kill himself. He does.
Nathan Explosion believes all dentists are suicidal whackjobs. He's right.
All Dethklok fans might qualify, since they sign Pain Waivers absolving Dethklok from any responsibility for accidents, injuries and fatalities during their concerts.
In Robot Chicken, 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.
"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!)
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.
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 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."
In The Lion King 2, If you thought it looked like Zira smiled during her fall, it's because she did. It was originally a suicide, but that did not make it past storyboard stage, probably because it was considered too dark for a child-friendly film.
Sponge Bob Square Pants had 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.
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.
You could make a drinking game out of all the references to suicide in Brave Little Toaster. Within the first few minutes, Phil Hartman violently self-destructs. Main characters routinely throw themselves off of cliffs, deliberately onto high places during a heavy thunderstorm, and into certain death. (Although they were all for heroic purposes.) There's one scene in particular where a lone flower wilts and dies after realizing its isolated fate. There is a can opener/lamp/shaver character who strangles itself with its own cords onscreen for not knowing its purpose. By the end of the movie, there's a cast of ruined vehicles in a junkyard which sing about how they're 'worthless', with themes of despair, regret, intolerance, and loneliness, one of them even willingly driving straight into a gigantic shredder to be compressed into small metal cubes. Hey, it was a different time.
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 Star Wars: The Clone Wars, a Twi'lek slave, having failed to assassinate her master, leaps to her death rather than continue living as a slave.
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.
In the episode "Princess Cookie" of Adventure Time, 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.
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 more of a "sacricide" than a suicide. She killed herself by giving her parts back to the princesses from which the Ice King had stolen them.
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).