"It is not our part to master all the tides of the world, but to do what is in us for the succour of those years wherein we are set, uprooting the evil in the fields that we know, so that those who live after may have clean earth to till. What weather they shall have is not ours to rule."
The Shadow of the Past,The Fellowship of the Ring. [Frodo expresses his disgust for Gollum to Gandalf having just learned that Gollum likely informed Sauron that the ring is with Bilbo in the Shire]
[Frodo] “What a pity that Bilbo did not stab that bile creature, when he had the chance!”
[Gandalf] “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 he took so little hurt from the evil, and escaped in the end, because he began his ownership of the Ring so. With Pity.”
“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. “I can’t understand you. Do you mean to say that you, and the Elves, have let him live on after all those horrible deeds? Now at any rate he is as bad as an Orc, and just an enemy. He deserves death.”
“Deserves it! I daresay he does. 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. For even the very wise cannot see all ends. I have not much hope that Gollum can be cured before he dies, but there is a chance of it. And he is bound up with the fate of the Ring. My heart tells me that he has some part to play yet, for good or ill, before the end; and when that comes, the pity of Bilbo may rule the fate of many.“
"I wish it need not have happened in my time," said Frodo.
"So do I," said Gandalf, "and so do all who live to see such times. But that is not for them to decide. All we have to decide is what to do with the time that is given us."
Gandalf is around two thousand years old at that point. What he might call "my time" has been very different from most other people's. He has seen kingdoms rise and fall, forests grow and wither, cities built and deserted many times over. Yet he has this peculiar ability to relate to and sympathize with the mere mortals around him, conferring to them bits and pieces of the wisdom he's gained over all those years. When he says "So do I," he is not faking sympathy. He really is down-to-(Middle-)Earth and knows how ordinary people feel.
There is a letter Tolkien wrote to a fan where he says:
"My ‘Sam Gamgee’ is indeed a reflexion of the English soldier, of the privates and batmen I knew in the 1914 war, and recognized as so far superior to myself."
But Arwen went forth from the House, and the light of her eyes was quenched, and it seemed to her people that she had become cold and grey as nightfall in winter that comes without a star. Then she said farewell to Eldarion, and to her daughters, and to all whom she had loved; and she went out from the city of Minas Tirith and passed away to the land of Lórien, and dwelt there alone under the fading trees until winter came. Galadriel had passed away and Celeborn had also gone, and the land was silent.
There at last when the mallorn-leaves were falling, but spring had not yet come, she laid herself to rest upon Cerin Amroth; and there is her green grave, until the world is changed, and all the days of her life are utterly forgotten by the men that come after, and elanor and nimphredil bloom no more east of the sea.
"It is not our part to master all the tides of the world, but to do what is in us for the succour of those years wherein we are set, uprooting the evil in the fields that we know, so that those who live after may have clean earth to till. What weather they shall have is not ours to rule."