Notice closely that "the shadow had fallen" on his heart. I don't believe that
is metaphorical. There are other forces at work in Middle Earth, besides Eru.
We are all subject to the influence of that shadow; Sam, too. We are-all of
us-potential Gollums.
Sam learned about Mercy much later than Frodo. Nevertheless, it's Sam's very
late act of Mercy in staying his hand on the slope of Mount Doom, that ensures
Gollum will reach the cracks in time to be used for good.
Sam is not evil, he is a sinner, as is Frodo. As is every character who
inhabits Middle Earth (our Earth, in fact) at any time. We differ only in
degree, not in kind.
a.s.
Stand by for new footer as soon as I get caught up with Real Life...