TV shows killing off a character is fairly commonplace. It's an easy thing to knock off a supporting player, guest star, or villain either because the story demands it, you want to deliver a shock to complacent viewers, or you need a boost in the ratings. They die, but life goes on.
Choosing to kill off a main character is something else. Whether it's just one central figure or the show has a few main characters, these are the ones who drive the story forward and for whom people tuned in. Killing them off can often be a death knell for the series, or simply means that it's wrapping up, with the major death coming in the pre-determined series finale.
To kill off a main character and then keep on surviving, perhaps even thriving, is the rarest of all death-related matters in TV, and yet, against the odds, these shows all managed it one way or another. Contains spoilers.
Honourable Mentions: Buffy The Vampire Slayer (Buffy Summers) And Six Feet Under (Nate Fisher Jr)
While both of these are instances of main characters dying - obviously Buffy was the titular character of her show, while Nate was so often at the heart of Six Feet Under's storytelling - the shows didn't quite go on without them.
Buffy, of course, was brought back from the dead not once but twice - the second time after a break between seasons - while Nate stuck around after his death as a ghostly apparition. So technically, yes, he was dead, but he wasn't absent. The shows did indeed survive them, with Buffy running for another two seasons, and Six Feet Under delivering an all-time great series finale, so they're still worth a mention, even if the characters didn't actually go anywhere.