Angel: Shunned by his people, Groo left to fight monsters until one would inevitably kill him. He laments that he couldn't even do that right, as he won every time.
Buffy the Vampire Slayer: In the season 4 episode "Doomed", Spike has been rendered incapable of harming humans by the Initiative's chip in his brain, and by the time of this episode, he's been reduced to such a shadow of his former self that Xander of all people openly mocks him and declares him to be Not Worth Killing. With that, he decides to dust himself by falling on a stake... but just as he's about to do so, Willow and Xander enter the room and distract him, causing him to miss the stake. Willow ends up feeling so sorry for him that she insists they take him along to thwart the current apocalypse and stop him from trying again (though Buffy and Xander can't possibly fathom why Spike committing suicide is a bad thing).
Episode "The Walk" of The X-Files opens with a man attempting suicide by drowning himself in boiling water and failing because he can't die. Mulder and Scully come to investigate it.
In "The Second Coming", A.J. Soprano tries to drown himself in his pool by tying a cinder block to his feet. A last minute change of heart leaves him stranded in the middle of the pool with his head barely above water.
Michael from Lost attempted suicide at least twice, but the island wouldn't allow him to die until he had redeemed himself for his actions in season 2.
The Twilight Zone (1959) Classic episode "Escape Clause". A man makes a Deal with the Devil for immortality and tests the pact by trying to commit suicide. Eventually, he starts doing so for money by threatening to sue companies for accidents he caused.
My Name Is Earl episode "Something to Live For:" the person Earl's helping this week, Earl had regularly stolen the gasoline out of his car. Problem was, the guy was trying to kill himself by running his car engine and piping the exhaust into the passenger compartment every night, but since Earl kept stealing his gas he kept running out of gas before he died.
Battlestar Galactica (2003) - Boomer has her suicide attempt interrupted by Baltar, who actually encourages her to do it. He leaves, then she bungles it anyway.
Discussed in The Wire: Omar's brother "No Heart" Anthony got his nickname from bungling his suicide attempt when he was sentenced to several years in prison. He attempted to shoot himself in the chest, but came away with only "a contact wound and a new nickname".
The Young Ones: Rick's attempt. After finding out no one in the house liked him, Rick tried to hang himself with his belt but couldn't find any place to attach it. He then tried to overdose on pills, not realizing the pills he was popping into his mouth by the handful were laxatives. Hilarity ensues.
Pretty much the entire premise of the show Gravity, a drama/comedy about a support group for people who have made failed suicide attempts. The main character is widely known as the "Suicide Dummy" for driving his car off of a cliff - and accidentally landing it in the swimming pool of a passing cruise ship.
The short-lived TV News Show Drama Live Shot had a character about to shoot himself in the head. There's a Gory Discretion Shot of a bullet cracking the glass on a picture on his wall, followed by the attempted suicide lamenting that "I missed. How did I miss?"
In the Superman The Musical TV Special, Superman was depressed after Metropolis shunned him. So, he tried to kill himself by tying an anchor to himself and jumping off of a bridge. Did anyone mention that this is the 'Man of Steel'?
In an episode of ER, a patient once came in after he Ate His Gun, but his aim was off, and instead of going through his brain, the bullet went out the back of his neck and left him alive.
The show's very first episode had Carol Hathaway being brought in, having overdosed on pills. This was actually supposed to be successful, but test audiences liked her character and so she recovered.
Subverted in Mad Men ("Commissions and Fees" S5E12): Lane Pryce tries to kill himself by suffocating himself with the exhaust of the Jaguar his wife bought him; however, the engine wouldn't start on account of the faulty electrical system (which had been mentioned several times earlier). However, he later goes back to his office and hangs himself instead.
In Sons of Anarchy, Juice tries several times to hang himself. When he does manage to jump off, the branch snaps.
A Hill Street Blues episode ends on a Cliffhanger when Lieutenant Howard Hunter puts his pistol to his head and the screen goes black as we hear the shot. The following week's episode opens with him coming into the precinct with a bandage on his temple and we learn that Detective J.D. La Rue suspected that Hunter would do such and swapped the rounds in his pistol for blanks.
Luck has a scene where Joey Rathburn calls his ex-wife and kid, hangs up, then puts a gun to his head. Right before he fires, a minor earthquake erupts, jogging his aim and making the shot go wild, ricocheting around the room until it grazes his cheek. He decides to go to a hospital instead where he discovers that his constant stuttering has stopped.
In the finale of Kamen Rider Gaim, Mitsuzane Kureshima took up artefact of Deadly Upgrade and went off to fight his archenemy. It never occured to him that he may not die in the battle, nor that said archenemy may still want to save him.
Played for Laughs on Scrubs when Ted tries to work up the nerve to jump off of the hospital roof, then ends up accidentally falling off (and smiling as he falls). He lands on a lower roof, where two janitors have placed a large pile of full garbage bags. If he had gone to the other side of the roof he would have succeeded.
An alien in Star Trek: The Next Generation attempts a Thanatos Gambit by shooting himself with Riker's phaser in order to frame Riker for his murder and permanently sour diplomatic relations between his race and the Federation. He fails because he doesn't know how the phaser works and ends merely stunning himself.
Taggart. In "Forbidden Fruit" a doctor decides to drown himself after being exposed as a fraud. His wife sees the overturned boat and rushes into the house to call for help, only to find him inside dripping wet. Things probably would have worked out if he hadn't forgotten about the written confession he left behind, in which he confessed to murdering the Victim of the Week.
In the first episode of Breaking Bad, Walter White attempts to shoot himself in the head, only to find that the gun he's using still has the safety on. He removes the safety and misfires the gun into the ground, and he decides not to kill himself after all.
On Seinfeld, a segment where Jerry performs stand-up has him talking about how he doesn't understand why some people try to commit suicide, fail, and then stop trying. Logically, they would have even more reason to end it all since they've become aware of yet another thing they suck at. He speculates that the whole reason their lives got so bad that they wanted to commit suicide in the first place is that they are too quick to give up on things.
Ellen's suicide attempt, shown in Flashback, in Slings & Arrows. She spends a while balanced on the edge of a bridge, dressed as Ophelia, with Oliver dramatically pleading with her not to jump and her telling him to go away. Then she does jump... and the water is about a foot deep. When she tells Geoffrey about it in the present day, he can't help but think it's hilarious.
Ellen: Don't laugh! I was extremely upset.
In Coupling, Jane attempts suicide by taking paracetamol. Two of them.
Jane: Well, that's as many as you're allowed, it says so on the bottle. You can only take eight in 24 hours. Frankly, I don't know how anyone finds time to commit suicide.
Susan: I think you'll find the point of an overdose is that you exceed the recommended dosage.
Jane: Isn't that dangerous?
Sally: Two paracetamol won't have any effect, Jane.
Jane: That's rubbish. It got rid of my headache, I feel fantastic!
Susan: Which, suicide-wise, isn't exactly a near miss, is it?
Hardware has a character attempt suicide after being humiliated by Mike, by throwing himself under a bus. He misses.
Gotham's version of Mr. Freeze was created this way. Like usual, Victor Fries wanted to cryogenically freeze his terminally ill wife Nora until a cure could be found, but was caught and arrested for testing his cryo-formula on people, just as he finally developed a batch that didn't kill the subject. Not wanting to wake up in a world where Victor was either dead or in jail, Nora chose to die rather than live without her husband by swapping the formula out for one of the deadly batches while Victor wasn't looking. After her death, a grief-stricken Victor attempts suicide in the same manner, but all the time he spent working on his formula had given him enough exposure to build up an Acquired Poison Immunity, and he is transformed into everyone's favourite Ice Person instead.
Prison Break has Paul Kellerman attempt to shoot himself after he is screwed over by The Company as well as getting ditched by Burrows, Scofield, and Tancredi. His gun jams. He decides afterward, following some advice from his estranged sister, to turn himself in and take down as many people as he can.
CSI: In "Better Off Dead", the team investigates what appears to be a one-man crime wave across Las Vegas that has left three people (and a dog) dead, and another wounded. It turns out have started with a bungled suicide (the man tried to kill himself with poison, the dog drank it and died, its owner (the man's manic-depressive girlfriend) arrived and shot herself in despair (the man hopes that it was because of him, but the heavy implication is that it was because of the dog) so he vomited the poison and tried to drive her to the hospital), with all of the chaos that followed being the result of the suicidal man's attempt to put things right (by killing himself).
American Horror Story: Murder House: Subverted. Violet initially believes that she survived her suicide attempt in the fifth episode. However, towards the end of the season, Violet learns from Tate that she's actually a ghost when he leads her to her hidden body in the basement.
Empire: During his mental breakdown because of his bipolar disorder, Andre attempted to shoot himself in the music studio, only for the gun to jam when he pulled the trigger. This incident eventually led to Andre getting psychological help, and later finding God.
Darcy attempted to kill herself after being raped, by slashing her wrists in the school's showers. Fortunately, Manny found her in time.
JT took oxycodone after Liberty discovered that he was selling drugs to support Liberty and their baby; however, he survived.
Zoe attempted to overdose on sleeping pills but lived.
Most recently, Maya attempted to overdose while alone on a bus. However, she woke up and ended up stumbling around the school before reaching the school roof, where she finally passed out. Esme and Zig found her almost dead, though they were later informed that she would make it.
Twin Peaks: In the Season One Finale, Nadine attempts to fatally overdose on pills. She survives, but for some reason wakes up with amnesia and Super Strength.
Control Z: Sofia tried to kill herself over the stress of her father turning out to be alive, but failed.
"Ah, sweet propane, take me away! ... It's not working - gah, this is an electric stove!"
Flesh and Bone: Mia attempts suicide after she's diagnosed with MS, since it means she'll be unable to do ballet anymore, though she survives.
Sense8: In the past, Riley apparently attempted suicide after the deaths of her husband and newborn daughter, judging by her wrist's scars, but survived.
Shadowhunters: In "Love Is A Devil", a spell amplifies Alec's regrets and insecurities, making him believe that Clary hates him for his possession-induced murder of Jocelyn. He tries to jump off a roof, but Magnus saves him.