In the final book of the Inheritance Cycle, Eragon uses a non-verbal spell in order to defeat Galbatorix. Galbatorix holds both Eragon and his half-brother Murthag captured, using magic, and prevents them from using the ancient language. The spell Eragon then uses literally makes Galbatorix realise what he has done, by telepathically giving him the viewpoint of the situation that Eragon sees.
During the darker part of his lifetime Galbatorix destroyed the entire order of Dragonriders. He has killed every last dragon except for Shruikan (his own) and three dragon eggs and later revealed Glaedr, an Elder dragon hidden by the elves... He gets killed in the third book though. He conquered Alagaësia and formed his evil empire, although that's not as bad as the fact that he almost wiped out an entire species.
Cassie has one of these way too many times to count in Animorphs. The Departure is one, where she comes down hard on herself after tearing out the throat of a Hork-Bajir controller.
Tobias has a few of them in his first few weeks as a hawk, when he's getting used to having to hunt to survive.
Also, Ax, in the aftermath of his threat to bomb the Yeerk Pool in The Deception.
And Erek, after he uses the Chee crystal to reprogram himself and goes Automaton to thrash a bunch of controllers and save the team.
After the war, Jake is so guilty about ordering to have the Yeerk pool flushed into space and sending Rachel, his cousin, to kill Tom, his brother (the former dies in the process) that he is driven to clinical depression. As Marco puts it: "He wore Rachel and Tom and those seventeen thousand Yeerks around his neck like the Ancient Mariner and his albatross ... He could've snapped his fingers and had anything he wanted, but he didn't want anything. Except for Rachel and Tom to be alive. For Tobias to come back. To unlive that fateful order that doomed seventeen thousand Yeerks."
The whole series exemplifies this, to some extent. The kids agree that self-defense is justified, but the problem is when you kill a Controller, you don't just kill the Yeerk; you're also killing the host, who is completely aware but unable to stop the Yeerk. The kids debate during the entire series what is acceptable when it comes to self-preservation and exactly how far is too far. Initially the kids take a very narrowminded, black-and-white view - "We have the right to do anything we have to to win" - but as they mature and experience more in the war their moral lines become blurred to the point that they don't know the difference between right and wrong.
The Stand by Stephen King: Harold, after he leaves Boulder post-explosion and crashes in the middle of the desert.
Nadine too, after she's pregnant with Flagg's baby - she has one so hard that she goads Flagg into throwing her off a penthouse balcony to kill her and the baby.
The Steward's family is big on these moments. Denethor has another when his younger son, Faramir, is brought back dying after being wounded in a pointless battle which Denethor sent him into.
This trope also turns up in J. R. R. Tolkien's The Silmarillion. Túrin has this reaction after he kills Beleg and Brandir. He kills himself after the second one. His father Húrin has a similar reaction when he realises his attempts to avenge his family have only helped Morgoth. He too kills himself. Maedhros has one when his attempt to get the Silmarils from King Dior leads to the deaths of Dior's two young sons, and he and his brother Maglor have an epic one later when they realise that all the evil they committed in the pursuit of the Silmarils was for nothing because, after all the evils they've committed in search of the Silmarils, the holy jewels burn them.. Maedhros then kills himself while Maglor spends the rest of time Wandering the Earth singing laments.
In Flag in Exile, Honor Harrington is attacked by an assassin who sees her as a corrupting agent of Satan... but the beloved leader of his church takes the bullet for her. Horrified, he drops the gun and falls to his knees: "My God, my God—what have You let me do?"
Amuro Ray again in the Mobile Suit Gundamnovel; this is however repeated later by the greenhorn Zeon pilot and Char's wingman, Lt. (jg) Leroy Gilliam after one-shotting the Gundam and killing Amuro in a case of (just at that point) friendly fire from his Rick Dom.
The end of Ender's Game sees Ender discovering that the simulations he and his team mates had run in Command School weren't simulations but ansible transmissions: the ships he sacrificed to win had contained real, living soldiers, as had the enemy ships he annihilated, and by destroying what he thought was a simulation of the enemy home planet, he had actually done just that and committed xenocide without knowing it. He also finds out about this time that he not just defeated but actually killed Stilson and Bonzo; he never heard about their deaths before.
The Formics get this too in the backstory when they, a hive minded species that places no value on the mindless drones used to fight wars, discovered that each and every human being they killed during their two wars with humanity was as much an individual as the Formic queens. Though they fight back when the humans invade them, they don't expect to win or even survive: they had recognized how humanity would have seen their invasions, and didn't expect to ever be forgiven for a crime of that magnitude. "The humans have not forgiven us; we shall surely perish."
In the book of Daniel, chapter 6, Darius, having taken over Babylon, is convinced to sign a decree that no one should petition any god or man other than the king for the next thirty days would be thrown into the den of lions. Daniel, who was the unspoken (at least to the king) target of the decree, heard about it, but continued to pray without making an attempt to hide it. The phrase is not recorded to have been said (it may have been "My gods," for all we know), but it does say he was "sore displeased with himself", and he tried to figure out a loophole or something until the architects of the decree reminded him that he couldn't change what he signed into law. (Of course, the lions end up not harming Daniel at all, and the king even said before they closed up the den that that would be the turnout, but the idea stands.)
Arguably Judas Iscariot's reaction after the crucifixion of Jesus Christ, whom he betrayed, supposedly earning 30 pieces of silver. He attempted to return the silver and undo the betrayal, and later hung himself or threw himself off a cliff out of guilt. Quite a few adaptations runs with this interpretation, portraying Judas as mistakenly believing that Jesus at most would be imprisoned in the moment of betrayal and then becoming utterly horrified when he learns that that the Sanhedrin actually wants to have the Romans execute him. Some of the apocrypha, including the "Gospel of Judas", purports this to be a necessary evil. The Bible has Jesus recognize this would happen, and warn all of the Twelve Disciples, including Judas.
In Graham McNeill's Fulgrim, Fulgrim's first words after he killed Ferrus Manus, were "Throne save me, what have I done?". His sword lets him realize the depths of his crime, and that his view of Ferrus Manus had been formed by spiteful misinterpretation of his deeds.
In Moby-Dick, Ahab has a moment like this when the Pequod sinks with Starbuck aboard. Starbuck was a good man, the only man on the ship who never let himself be sucked into Ahab's mad quest or cult of personality, and therefore the only one who manifestly did not deserve such a horrible fate. Ahab himself dies moments afterward.
In The Dark Elf Trilogy (the second book, Exile), Drizzt ponders on this when he starts to realize that living on the run all the time, constantly paranoid, has caused him to start to lose his humanity, especially after cutting off his sister's fingers and nearly killing his brother; however, it isn't until Gwehywvar looks him in the eye that he starts to realize it and tries to find ways to regain said humanity... or elfmanity.
Gromph at the end of Archmage, first book of the Homecoming trilogy, shortly after realizing that he just summoned the Prince of Demons to Menzoberranzan. He almost scratches his own eyes out before fleeing to Gauntlgrym.
Off-page, Mammon Hoole performed an experiment that unleashed a World-Wrecking Wave on the planet he was on; only he and his coworker escaped the devastation, which killed all life on Kiva. Utterly horrified and blaming himself, he hid for four years and came out of it as an emotionally crippled Atoner, determined to try and make some good of his life. It all came crashing back in when he was forced to return to Kiva and saw the furious Kivan wraiths, who blamed him just as much as he blamed himself. He didn't think the experiment would turn so catastrophic; his coworker knew but didn't tell him, wanting to see it happen.
In the last book, an Apocalyptic Log made by someone stranded on Dagobah is found. The last entry has this.
"Some of the survivors went ahead and started families. They've had children. That's the worst. We're all on the edge of starvation... and now we have children to feed. We've gotten so hungry... the children crying from hunger... that we've-" The woman on the hologram shuddered and started to cry. "May the stars forgive us... we've fed them meat from-"
The novel Act of War has Kelsey quite distraught after she realises that she had unwittingly ordered Carl Bolton to his death.
Edge of Battle has a US Army Humongous Mecha mobbed by rioters at a detention camp for illegal immigrants ("Jumping the shark"?) and reflexively responding with predictably horrific results. When he comes back to his senses the mecha's pilot calmly and methodically climbs down from his vehicle, picks up the first available firearm and puts a bullet through his head.
In Harry Potter and the Half-Blood Prince, after Harry, panicking and about to be Crucio-ed by Draco, unwittingly tries out his new "Sectumsempra" spell for the first time in the bathroom. The result is Draco being slashed to bits. Whoops.
Also Severus Snape, after he realizes his actions have inadvertently sentenced a woman he loves to death. Whoops again.
And in the film version of Goblet of Fire, when Harry doesn't resurface from the Hogwarts Lake for a minute or so after being given his underwater breathing apparatus (Gillyweed), Neville gasps, "Oh my God- I've killed Harry Potter!" Harry then promptly does a spectacular backflip out of the water, making everybody know he's quite alright.
Ariana's death - possibly at his own hands - was this for Dumbledore.
Harry, when he realises his actions lead to Sirius' death; probably Sirius' reaction when he realised James and Lily died because of him.
Presumably Percy Weasley before he reconciles with his family after a three-year estrangement, which resulted from his own pomposity and selfish career ambitions.
In Cry Mercy, the third volume of Toni Andrews's "Mercy Hollings" series, the title character confronts her adoptive parents in order to seek answers about her mysterious origins and troubled childhood. Throughout the series, she has expressed a great deal of anger towards her adoptive parents for dissolving the adoption and giving her back as a ward of the state at the age of twelve, which led her to spend her teenage years in a series of unhappy foster homes. She believes they abandoned her because they couldn't deal with the fact that she was a psychic with the power of Compelling Voice. However, her former adoptive mother reveals that although her adoptive parents feared her powers and found her difficult to deal with, they cared about her and didn't intend to give her up until she used her Compelling Voice power to make them do so by telling them "Get out of my life and leave me alone!" in a fit of adolescent rebellion. She had repressed the memories of what had really happened, and realizes later that she is at least partly responsible for the problems that have made her miserable all her life. Mercy has another moment like this later on when trying to get an armed gunman to put down his weapon and release his hostage. She does not have perfect control of her power, and when he fails to respond at first she loses her temper and thinks, "Goddammit, why don't you just blow your own brains out?!". Her anger makes her powers kick in and she has the man's death on her conscience, although she saves the hostage.
Warrior Cats: Lionblaze does this a lot in the latter half of Power of Three, usually after he loses control of himself, or during one of his homicidal Nightmare Dreams.
Brambleclaw also thinks this when he accuses Leafpool of revealing to the other medicine cats of the badger attack. Bonus points for realizing that he made things worse by telling Hawkfrost, who told ShadowClan in return. Because of this, he couldn't apologize to Leafpool or else he would reveal he and his brother were visiting Tigerstar.
Clear Sky gets this at the end of The First Battle, realizing that his fear of others dying had made him a monster, obsessed with order and borders. He, along with the other founders, promises to make things right after the battle at Fourtrees.
The Poisonwood Bible: Nathan, after Ruth May dies unbaptized due to his desire for a dramatic conversion of the village.
In Adventures of Huckleberry Finn, Jim strikes a little girl for not listening to him when he told her to close the door. It turns out she couldn't listen at all. She was deaf.
In Aaron Allston's Galatea in 2-D, the hero tortures one of the villain's mooks to try to get information from another. He slackens off without getting everything he wanted, realizing that she didn't know anything and that he was invoking What Measure Is a Mook?. That thought horrifies him — just because they weretwo paintings who came to life, and whom the villain had sent to kill him didn't mean torturing them was all right. In the end, the villain is killed, but the hero tells the mooks that if they stay out of his way, he won't bother them.
Appears near the end of Manon des Sources for Papet. He discovers that Jean, the man who he had ruined in the first part of the duology, was actually his son. Florette hadn't rejected him, as he thought, but was pregnant and had tried to move on when he didn't respond to her letter (a letter he obviously never received). Watching the look on Papet's face when this fact sinks in will quickly show the viewer why this movie launched Yves Montand to worldwide critical acclaim.
Pride and Prejudice: Elizabeth's turn comes when she reads Mr. Darcy's letter and realizes how flawed her judgment of Mr. Darcy and Mr. Wickham has been and that she herself is guilty in this area of the pride and vanity she so abhors.
Mansfield Park: Sir Thomas (the heroine's uncle) deeply regrets how he raised his daughters to be spoiled, vain, Brainless Beauties and what a stern, cold father he was when he sees the effects such an education has had on them.
Emma: Emma is horrified over the mischief and pain her matchmaking efforts cause.
Persuasion provides a subversion (in the correct use of the term): Near the beginning, Anne looks back with regret on breaking her engagement to Captain Wentworth, but the book ends with her realizing she was wrong and deciding I Regret Nothing. Captain Wentworth himself plays it straight when he realizes what a mistake he made never coming back to ask Anne to marry him again after he began to make his fortune.
Non-lethal/non-romantic example: A widower-turned-priest in the Brother Cadfael series spent an entire novel trying to marry off his daughter to a man she didn't even like, because he thought that having her around would hinder his advancement in the clergy. Eventually she runs off to Dublin with a Danish youth to escape the Arranged Marriage; hearing this, her father contentedly proclaims that he'll never see her again ... and then pauses, and says it again in tones of grief, as the belated realization that he'd loved and will miss her hits home.
Susan's aunt from Wizard and Glass may have died of this trope, as it's speculated that her fatal heart attack occurs when she comes out of her enraged trance and realizes that she's just gotten her innocent, and pregnant, niece burned at the stake.
In Over the Wine-Dark Sea Sostratos tells Menedemos a story of a Pancrationist (one of the nastiest combat sports invented) in Athens who kills his opponent (a very easy thing to do in Pancration) and goes mad with rage because of it.
In L. Jagi Lamplighter's Prospero Lost, Miranda leads a boat that is pursuing hers on a route that ends with his crashing and dying. In Prospero In Hell, she learns he wasn't an enemy. Nearly has Tears of Remorse.
Discworld: Carrot has one of these moments in Men at Arms. He spends the night with Angua, and wakes to find a large wolf in the room (she's a werewolf). She runs away, and shortly after Carrot finds out exactly what just happened, he realizes that the first thing he did when he saw "the wolf" was reach for his sword.
Jean Valjean of Les MisÚrables has a Heroic Blue Screen of Death based on this trope after he robbed a child. The robbing happened right after his encounter with Bishop Myriel, who gave him a second chance at freedom after Valjean betrayed the Bishop's trust and robbed from him. The combination of these two events cause a guilt trip several pages long.
Tsion Ben-Judah's reaction in in the Left Behind book Desecration when he realizes he has given away the location of where the Israeli Jews would flee to according to what the Book of Revelation says about the matter (the deserted city of Petra), fearing that he has messed up God's plan. He gets some reassurance from one of the Tribulation Force members that God may have intended for Tsion to let slip the location of where the Jews would flee to in order to lure Nicolae Carpathia's forces into a trap God has set up for them, which is all according to the Word of God.
In Septimus Heap, Marcia has this reaction after she accidentally Banishes Alther to the Darke Halls in Darke.
Elizabeth Bathory goes through this in Count and Countess when she realizes bathing in blood is not curing her epilepsy, and she has been killing young girls for no reason at all.
Stephen Fry's The Stars' Tennis Balls has its vengeance-obsessed hero break free of his island prison and return to Britain to pursue a drawn-out violent campaign against those whom he sees responsible. After various horrific killings, he looks forward to reuniting with his college sweetheart. But she knows what he's done. The close of the book has him voluntarily returning to the prison he escaped, in all likelihood to stay there until he dies.
The concentration camp commander in The Boy in the Striped Pyjamas. Losing your son because of his naivete in regards to the camp you commanded can't be a good experience for anyone.
Rick Deckard, the protagonist of Do Androids Dream of Electric Sheep?, is a Bounty Hunter tasked with killing androids who are posing as humans. He gets one of these moments midway through the book, after eliminating an android who had been working as an opera singer, and had earlier moved him with a song. He is ashamed that he has destroyed something beautiful and, on another level, worried about what this newfound empathy for his prey says about him.
John realizes too late that leading his people to war was entirely the wrong thing to do in Dirge for Prester John. They are unable to grasp the concept of war, or even the death that accompanies it, and treat it almost like a kind of game. This ends tragically.
The titular doctor in Frankenstein experiences this feeling immediately after bringing his creation to life. After working himself to the bone for months over this project, the realization that he has created a hideous mess of a creature instead of the ideal man he had intended sends him into a bout of brain fever lasting for months.
The monster himself has one at the end when he discovers that Victor Frankenstein has died of exhaustion from chasing him all over Europe. After realizing that killing Victor's innocent family members and family friend out of anger at his creator was all for nothing, and that he has become the monster everyone thought he was, he plans to commit suicide in order to atone for his crimes.
In the David EddingsMalloreon series it's revealed Zakath went through this. When he was a young man of eighteen, new to position of Emperor of Mallorea and madly in love, there was a plot against his life. The mastermind was revealed to be his lover. With the evidence against her so overwhelming as to be undeniable, he sentenced her to death. Shortly after her death, it was revealed that the mastermind was actually Taur Urgas, King of the Murgos and he had deliberately set up an innocent young woman just to spite his sworn enemy. Utterly beside himself, Zakath shut himself up in a room for a month. What eventually emerged from that room was an Empty Shell that spent the next twenty-thirty years trying to wipe every Murgo alive off the face of the planet.
It gets even worse. He looks into the Orb of Aldur when Belgarion is his prisoner and learns that the current king of the Murgos, Urgit, was the result of an affair between a Drasnian and one of Taur Urgas's wives - in fact, the bloodline of Taur Urgas went extinct years ago. He has a complete breakdown, weeping for what's probably the first time in thirty-odd years, as he realizes how many people have died for revenge against a family that doesn't even exist anymore.
"He has escaped me... and I've slaughtered tens of thousands for nothing..."
In the prequel, Belgarath the Sorceror, as it becomes increasingly clear that the War of the Gods will be necessary, Belsambar, an Angarak exile, notes that because Angaraks build walls around everything, any attack on their cities would require the use of siege engines. He then suggests that raining fire down upon the cities would probably encourage the Angaraks to surrender more quickly. The war comes, and his brothers put his suggestions into practice, causing thousands of deaths, and driving Torak into such a panic that he actually uses the Orb of Aldur, cracking the known world in half, which naturally has catastrophic effects. Horrified at what has happened, and convinced that he was responsible for all of it, Belsambar unmakes himself, blowing both himself and his tower to bits.
In Omega Rising, Jenny has one of these when she realises that Knight is really Ethan after she helps in his capture.
In The Underland Chronicles, Hamnet has this when while trying to drive the rats out of the Garden of the Hesperidies, he permanently floods the garden, destroying the apple trees, drowning countless rats, bats, humans, and even the rat pups who had been taken into the cave to escape the fighting, leading to him fleeing Regalia to live in the jungle.
In Harry Turtledove's The Road Not Taken an alien race called the Roxolani attempts to invade Earth...and fails miserably. The thing of it is, the secret of the Roxolani's antigravity and FTL technology turned out to be so absurdly simple that it left their race in a kind of Medieval Stasis, halting their technology at the level of cannons and black powder muskets. Somehow, Earth completely missed the secret of antigravity and FTL, forcing them to exploit every other area of science and technology. After the Roxolani invasion fails miserably, the survivors are taken prisoner and questioned. The captives take note of the fact that humans seem extremely advanced in all areas of science, except they never discovered the secret of interstellar travel. When one of the captives points out that now the humans do know the secret because of the failed invasion, the Roxolani turn to each other and ask themselves, "What have we done?"
In the Rainbow Magic series, in Jennifer the Hairstylist Fairy's book, Rachel and Kirsty accidentally wreck a goblin's wig while trying to help Jennifer. Upon seeing his saddened reaction, they feel incredibly guilty and agree to restore it if he gives back the magic hairbrush.
Harry Dresden postulates to Michael Carpenter, a Paladin serving G-D, the reason the Fallen Angels avoid churches isn't because Good Hurts Evil and just standing there is uncomfortable, as Michael suspects, but it makes them feel Him and remember their time loving Him and serving Him. Remembering those times makes them feel sad. They question their choices in their existence, and after a million years or more of steadfast belief you were in the right, and it turns out you were wrong and everything you did was for nothing, it is not an easy revelation to handle on one's conscious.
In Changes, he has this reaction preemptively to what he's about to do, when he conceives of the plan to get Susan to succumb to her vampire infection, then sacrifice her to kill the Red Court. The last line in the chapter is a heartbreaking, "God forgive me."
In Ghost Story, he sees that his zeal in saving his daughter in the previous book have left his apprentice seriously screwed up and has a moment like this.
In George R.R. Martin's early short story "And Death His Legacy" (collected in Dream Songs), the protagonist says this after the right-wing demagogue he assassinated becomes a martyr.
In Jeramey Kraatz's The Cloak Society book Fall of the Heroes, after Alex unleashes his powers full blast and causes Julie, with her claws fully extended, to collide with Phantom, mortally wounding her, he feels this; he's not even certain that it was an accident and wonders whether he would do it again.
Harahpin : Thrym becomes disgusted with himself when he realizes just what he did to Euron and Eyrco.
Euron's reaction when he realizes that him leaving to go help Eyrco and Solarus with Desmodea resulted in Saphillin taking off. The fact that the planet has nothing but hostile lifeforms, save for Gold-Patches, and the fact that Saphillin is so unresponsive that he wouldn't defend himself against any threat makes his guilt so much worse.
Tris reacts this way after Al commits suicide as a result of her refusing to forgive him, though she eventually learns to live with the fact that she's not a forgiving person, and no one blames her given Al assisted in an attempt on her life and molestation.
The Dauntless army as a whole reacts this way along with Mass "Oh, Crap!" when Tobias ends the simulation brainwashing them as a mindless army, forcing them to remember the senseless murder they've just committed.
Knowledge Of Angels: Severo reacts this way after he realizes what is going to happen with Palinor after he turned him over to the Inquisition.
Dimitri's general reaction after he is changed from a Strigoi back into a dhampir by Lissa in Spirit Bound.
"I did a lot of things . . . horrible things." He turned his hands palm-up and stared at them for a moment, like he could see blood. "What I did to her was worst of all—especially because it was her. She came to save me from that state, and I. . ." He shook his head. "I did terrible things to her. Terrible things to others. I can't face her after that. What I did was unforgivable."
Journey to Chaos: The true immensity of Nunnal's gamble at the climax of Mana Mutation Menace doesn't hit her until after its over.
This decision will haunt me for the rest of my eternal life
In The Discreet Princess, Rich-Craft's last request is for Bel-à-Voir to marry Finette and then kill her as soon as possible. He stabs her in the heart... and since he fell in love with her by then, he is so regretful that he intends to kill himself at once as well. The only thing that stops him is that the princess was Properly Paranoid enough to use a Sleeping Dummy.
In The Girl From The Miracles District, Nikita has this moment after killing Ture on her mother's orders, realizing that even after all those years, she's still Irena's puppet, and that she should've helped Ture. In an inversion of the usual course of events, the realization makes her stronger.
In The Kharkanas Trilogy the Terondai Draconus commissioned from Errastas needed a blood sacrifice, but nobody bothered to tell him that. When he finds out that he indirectly killed Hood's wife Karish, he is rather horrified.
In Edgedancer, one of the villains has this reaction when he realizes that he's been serving the wrong cause all along.
Storms. Jezrien... Ishar... It is true. I've failed. (...) I failed weeks ago. I knew it then. Oh God! Oh God the Almighty!