Warren Adler's The War of the Roses, which is about Jonathan (Oliver in the film) and Barbara Rose engaging in an increasingly vicious divorce battle.
Ranklechick by Rikki Simons is about ghouls in a zoo around Jupiter that fly through space in ships powered by particles that insult physics and then get beaten up. It's a touching story of Christmas and insanity.
Lampshaded (kind of?) in one of the shadowy conversations that open a chapter in Ender's Game:
"I think you underestimate Ender." "But I fear that I also underestimate the stupidity of the rest of mankind. Are we absolutely sure we ought to win this war?" "Sir, those words sound like treason." "It was black humor." "It wasn't funny. When it comes to the buggers, nothing—" "Nothing is funny, I know."
Lewis: (facing the end of the world on his birthday) - 'This is the worst birthday present I have ever had.'
Marsh (after yet another waistcoat gets soaked in a dying man's blood) - 'It seems a man cannot keep a suit more than two days in your company, Lewis,’ Marsh complained, washing the blood from his hands. ‘I’m certain you do it deliberately!’
If anything in one of Chuck Palahniuk's books makes you laugh, it's Black Comedy.
"I want to have your abortion.", spoken by Marla to Tyler in Fight Club.
The self-described "Bad Catholic" humorist John Zmirak has been known to quip "If you can't joke about terrorism and cancer, what can you joke about?"
Any of Derek Robinson's novels. The war novels are more black than comedy, but the spy novels are more comedy than black (but still pretty black).
There is saying mentioned in one of stories from Žamboch: Hope dies penultimate. What remains till the end is dark humour.
The Late Hector Kipling by David Thewlis. Throughout all the tragedy that the main character has to deal with, he finds himself unable to respond "properly" to it, to be sad and grieve like any other person would, which leads to bizarre situations and conversations. A large chunk of the book is actually about his hope that someone close to him would die already.
Frequent in the stories of Flannery O'Connor. For example, in Wise Blood, none of the major characters are good people or even particularly sympathetic, while the plot involves absurdities like a stole gorilla costume, an anti-church being corrupted into a money-making scheme, and the attempted seduction of a girl who turns out to be a Fille Fatale.
“So this man walks into a bar. He sits down at the stool, says hey, bartender, bring me a bloody Mary. The bartender steps into the backroom. The man hears someone scream from behind the door, and then three loud thumps. A minute later, the bartender comes back out carrying your wife, bleeding from the head, and lays her on the table. Ha!”
World War Z, when two soldiers pick up human infant skulls and put on a small show for their troop. Would be going into offensive territory if the real subject wasn't about the Gallows Humor used for coping with... you know... a Zombie Apocalypse.
Clive Barker's Mister B. Gone: Filled with the darkest of humor, as can be expected from Clive Barker. There's a scene where the demon villain protagonist bathes in a tub full of blood from dead babies. The townspeople are hot on his trail, since there was a hole in his baby bag, and he left a trail of children, like bread crumbs, on his way back to his hovel. He complains how difficult it was to keep them alive so the bath would be warm when he emptied their blood into the tub.
Mrs. Hall, of Sherborne, was brought to bed yesterday of a dead baby, some weeks before she expected, owing to a fright. I suppose she happened unawares to look at her husband.? Jane Austen, letter to Cassandra, October 27, 1798.
"It was born, though, that very evening, took one look, according to the Radletts, at its father, and quickly died again" Nancy Mitford, Love In A Cold Climate
In The Dark Tower series, Eddie actually manages to defeat the depressed, super intelligent AI in the train that's trying to kill itself and them with a dead baby joke.
Why did the dead baby cross the road? Cause it was stapled to the chicken.
The short story "Survivor Type" is about a drug dealing surgeon who gets stranded on a deserted island with no food but plenty of heroin. Eventually he starts cutting off his own limbs and eating them as he gradually loses his mind. "They say you are what you eat and if so I HAVEN'T CHANGED A BIT!"
Stephen King novels in general. The bits that aren't pure terror are this trope. Sometimes they even go side-by-side.
In Lawrence Block's novel Ariel, Ariel's friend Erskine has a proclivity for this.
Hilaire Belloc's Cautionary Tales for Children is in part just that: a book of poems where bad things happen to children who do bad things—no matter how trivial. Really, though, Belloc makes their punishments absurd to make for better comedy.
The stories are filled with grim jokes about injury and death. For example, this passage from the first chapter of the first book:
"Well!" thought Alice to herself. "After such a fall as this, I shall think nothing of tumbling down-stairs! How brave they'll all think me at home! Why, I wouldn't say anything about it, even if I fell off the top of the house!" (Which was very likely true.)
In Through the Looking Glass, in fact, many jokes about death are pointed directly at Alice. The most overt one is this exchange between her and Humpty Dumpty, after she tells him her age:
Humpty: An uncomfortable sort of age. Now if you'd asked my advice, I'd have said "Leave off at seven" — but it's too late now. Alice: I never ask advice about growing. Humpty: Too proud? Alice: I mean, that one can't help growing older. Humpty:One can't, perhaps, but two can. With proper assistance, you might have left off at seven.
Everything Tom Sharpe ever wrote, especially The Throwback.
Matthew Waterhouse's novels Fates, Flowers and Vanitas revel in black comedy to the event where it becomes a selling point.
Roald Dahl's love of this has helped keep some of his children's novels on "most challenged books" lists for decades now. Charlie and the Chocolate Factory has whole musical numbers in-story in which the Oompa-Loompas gleefully sing about the awful fates of children who misbehave, for instance. The 2013 stage musical adaptation takes this aspect further — while in the novel and most adaptations it is clear the naughty kids at least survive their ordeals, several of them may be doomed to Death by Adaptation in the musical (they'll get an offstage Disney Deathif they're lucky) and it's stillPlayed for Laughs! The 1971 film adaptation doesn't go as far as the musical, but it does go further than the book in that it doesn't specify whether the kids survived.
In the Star Trek novel Spock's World, Kirk references his near-death in "Amok Time" by saying that "those of [the audience] who know the circumstances under which [he] left [Vulcan would] guess [he] was rather glad to get away again."
Existential Terror and Breakfast: Most of its comedy is taken from the horrors of an existential crisis, such as facing the inevitability of death. It has a countdown to the day the main character dials a suicide hotline on the top of every entry.
Skinjumper by Lincoln Crisler is a combination of Black Comedy and Horror novel. Much of the humor is derived from the fact, despite having the ability to switch bodies via murder, Terry Miller is too stupid not to get into trouble with massive numbers of people.
The Fault in Our Stars, in spades. Hazel and Augustus joke about how Augustus is so handsome he literally blinded Isaac and "took Hazel's breath away". Isaac's eulogy for Augustus at the "prefuneral" also counts.
Thomas Hood's "Sally Simpkin's Lament" and "Faithless Nelly Gray" (not to be confused with his "Faithless Sally Brown") have bad puns about death and dismemberment in practically every verse.
In Thomas Ingoldsbynote Whose real name was Richard Harris Barham.'s "The Knight and the Lady" the body of Lady Jane's lover Sir Thomas is fished up out of the pond with a rather large quantity of eels attached to it. In a case of "waste not, want not" they serve the eels for supper after a fair bit of mourning. As for Lady Jane's final reaction...
"Eels a many I've ate; but any So good ne'er tasted before! — They're a fish, too, of which I'm remarkably fond. — Go, pop Sir Thomas again in the pond; Poor dear! — HE'LL CATCH US SOME MORE!"
The Iron Teeth constantly uses the murderous instincts of its protagonist for comedic purposes.
In the Young Amelia Bedelia chapter book Amelia Bedelia Makes a Splash, this is played with using Amelia Bedelia's Literal-Minded tendencies. Amelia Bedelia meets a woman who attended summer camp with her mother named Mrs. Evans, who is a widow. Unfortunately, she and the other characters make the mistake of referring to her husband being dead using only euphemisms. Amelia Bedelia variously hears "I wish my husband, Harold, was here," "my late husband... really late," "her husband expired," "is no longer with us. He has departed" and "I lost him more than twenty years ago." Amelia Bedelia, not properly following any of this, at one point tries to order a spaghetti dinner for her husband, who she thinks is literally just "late." Finally, Mrs. Evans asks her "Do you understand my husband died?" and a rather embarrassed Amelia Bedelia says that she's sorry and has to leave the room for a moment, and also cancel the spaghetti dinner.
Examples of this abound in post-apocalyptic Victoria, mainly in the form of extremely dark irony as the protagonists and their allies lampshade the horrible events they experience. Here's how one officer reacts to the nuking of Atlanta: