Of course it's very exciting for us viewers when a major character dies on a television show (or it's sad? Sure, sometimes it's sad), but for the actor involved it must kinda feel like, "Oh, well, I just got fired." Though usually official word from the set is that everything was fine and copacetic.
A Mad Men spoiler warning just in case you haven't watched Sunday's big episode. OK, you gone? Good. For the rest of us: We were all of course terribly surprised when charming but frustrated Lane Pryce up and hanged himself two nights ago, but how did the actor who plays him, Jared Harris, take the news? He tells the Los Angeles Times, "I'm sad that I will no longer be working with them, and for [show creator Matthew Weiner], and on that incredible material. But you can't question the man's dramatic judgment." Very diplomatic, of course. He says that Weiner broke the news to him in his office after a table read, offering Harris some fancy brandy, just as they might do (and in fact did in Pryce's case) on the show. So that seems a rather dignified way to get fired. And, of course, Harris realizes that the death was an effective shock enough to be oddly beneficial. We're all paying attention to him now!
Sometimes the firing isn't quite as elegant, unfortunately. In a recent video roundtable interview with The Hollywood Reporter, Boardwalk Empire creator Terrence Winter reveals that [again, spoiler alert] the death of dashing gangster Jimmy Darmody was revealed to the actor Michael Pitt by email, after they couldn't get a conference call together because of producer Martin Scorsese's busy schedule. Pitt knew it was coming (he apparently wasn't thrilled, but understood), but Winter of course would have preferred to tell him through a slightly more personal medium.
Also in that roundtable, The Walking Dead showrunner Glen Mazzara reveals that [spoilers, guys, there are just lots of spoilers here] actor Jon Bernthal, whose character Shane was killed off and zombified and killed again toward the end of last season, actually tried to talk Mazzara out of getting rid of his character. Mazzara was ultimately unswayed, and really Bernthal should have been grateful: In the comic book source material, Shane dies way earlier in the story. So, be happy for the time you had!
The takeaway here is that every experience of killing off a character is different — some actors think it's punishment for something, some successfully talk their way out of it (according to a 24 producer, anyway), others accept the artistic vision — but that all of it is pretty weird. Someone is getting fired from a good job and that's a personal bummer for them, but oftentimes it's to the benefit of the show, and the audience at home is thrilled/excited/intrigued/etc. So it can be a glorious way to leave a job, with celebration and blog posts and whatnot. Most of us just walk out with our sad box packed with random junk and a dying potted plant. These guys get to do a hand-waving farewell tour. We should be so lucky to get fired like that.