"Sam got up. He was dazed, and blood streaming from his head dripped in his eyes. He groped forward, and then he saw a strange and terrible thing. Gollum on the edge of the abyss was fighting like a mad thing with an unseen foe. To and fro he swayed, now so near the brink that almost he tumbled in, now dragging back, falling to the ground, rising, and falling again. And all the while he hissed but spoke no words.
The fires below awoke in anger, the red light blazed, and all the cavern was filled with a great glare and heat. Suddenly Sam saw Gollum’s long hands draw upwards to his mouth; his white fangs gleamed, and then snapped as they bit. Frodo gave a cry, and there he was, fallen upon his knees at the chasm’s edge. But Gollum, dancing like a mad thing, held aloft the ring, a finger still thrust within its circle. It shone now as if verily it was wrought of living fire.
‘Precious, precious, precious!’ Gollum cried. ‘My Precious! O my Precious!’ And with that, even as his eyes were lifted up to gloat on his prize, he stepped too far, toppled, wavered for a moment on the brink, and then with a shriek he fell. Out of the depths came his last wail Precious, and he was gone."
John Ronald Reuel Tolkien
The Lord Of The Rings:
The Return of the King
"...wavered for a moment on the brink, and then with a shriek he fell. Out of the depths came his last wail Precious, and he was gone."
It′s the truth. Everything else is a lie, a blatant lie concocted by cowardly hobbits for the sake of being branded as heroes. It was Gollum who saved Middle-earth and that cost him his life.