'I am sorry,' said Frodo. 'But I am frightened; and I do not feel any pity for Gollum.'You have not seen him,' Gandalf broke in.
'No, and I don't want to,' said Frodo.
Then, in The Two Towers Frodo has just captured Gollum and is recalling the conversation between he and Gandalf. In full, this is what it says:
What a pity Biblo didn't stab the vile creature, when he had a chance!Pity? It was Pity that stayed his hand. Pity, and Mercy: not to strike without need.
I do not feel any pity for Gollum. He deserves death.
Deserves death! I daresay he does. Many that live deserve death. And some die that deserve life. Can you give that to them? Then be not too eager to deal out death in the name of justice, fearing for your own safety. Even the wise cannot see all ends.
Then Frodo says:
'Very well,' he answered aloud, lowering his sword. But still I am afraid. And yet, as you see, I will not touch the creature. For now that I see him, I do pity him.Sam stared at his master, who seemed to be speaking to someone who was not there. Gollum lifted his head.
I just found it interesting that not only did Frodo recall what Gandalf said to him, but he also recalled that Gandalf had implied that he needed to see Gollum before making up his mind and that now that he had seen him, he was still afraid but now had pity.
"Thou art inexcusable, O man, whoever you are who judge, for in whatever you judge another you condemn yourself; for you who judge practice the same things." (Roms. 2:1)
So Frodo, by an act of compassion, saved himself.