From Ralph C. Wood on "J.R.R. Tolkien's Vision of Sorrowful Joy":
As a thoroughgoing Augustinian, Tolkien held that such homage enables the accomplishment of our fundamental life-task: the setting of our desires and loves in right order, honouring God above all else, and thus loving all other realities according to their relatively subordinate worth. It is just such honour that the rebel vala named Melkor refused to grant Iluvatar, the divine Creator. In an act of proud rebellion akin to Lucifer's own revolt against Yahweh, Melkor sought his own autonomy, thus ruining the cosmic harmony as Iluvatar had orchestrated it. Before he was finally defeated, Melkor (renamed Morgoth, or "the Dark Enemy") recruited a maia named Sauron ("the Abominable") to his cause.
Here we enter the actual setting of The Lord of the Rings, since it is the Dark Lord Sauron who has fashioned a single Ruling Ring by whose coercive power he schemes to dominate the then-known world called Middle-earth. ....
It is clear that Tolkien shares St. Augustine's understanding of evil as privatio boni, the privation or absence of true being, the perversion or deformation of the good. Evil exists only parasitically, leeching off the good, having only the negative power to damage and destroy. Exactly because evil has no proper substance or essence, however, the Devil can feign numerous appearances, embodying himself in all sorts and conditions of deceit. ....
It is not so in Middle-earth. ....
The animating power of this Company is the much-maligned virtue called pity. It is a word that has come to have malodorous connotations, as if it entailed a certain condescension toward its recipients — as if the one who grants pity stands above them in moral and spiritual superiority. Knowing well that pity was the quality that Nietzsche most despised in Christianity, but also that the word derives from the antique Roman elevation of pietas as a fundamental reverence toward everything to which we owe our lives, Tolkien transforms the term into the epic's chief virtue.
Frodo had learned the meaning of pity from his Uncle Bilbo. When he first obtained the Ring from the vile creature called Gollum, Bilbo had the chance to kill him but did not. Frodo is perplexed by this refusal. 'Tis a pity, he contends, that Bilbo did not slay such an evil one. This phrase angers the wise Gandalf. It prompts him to make the single most important declaration in the entire Ring epic:
"Pity? It was pity that stayed his hand. Pity, and Mercy: not to strike without need. And he has been well rewarded, Frodo. Be sure that [Bilbo] took so little hurt from the evil, and escaped in the end, because he began his ownership of the Ring so. With Pity."Gandalf the pre-Christian wizard here announces the unstrained quality of Christian mercy that is completely unknown to the pagan world. Not to grant the wicked their just penalty is, for the ancient Greeks, to commit an even greater injustice. As a creature far more sinning than sinned against, Gollum thus deserves his misery. He has committed Cain's crime of fratricide in acquiring the Ring. Even so, Gandalf insists on pity, despite Frodo's protest that Gollum be given justice. If all died who warrant punishment, none would live, answers Gandalf. Many perish who have earned life, Gandalf declares, and yet who can restore them? Neither hobbits nor humans can live by the stones of merit alone. .... [more]
"I am sorry, "said Frodo. "But ... I do not feel any pity for Gollum ... He deserves death."
"Deserves it! I daresay he does," [replies Gandalf]. "Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement ... [T]he pity of Bilbo will rule the fate of many - yours not least."