The Lord of the Rings has many great passages, one of which, early on, concerns Gollum. Gandalf paints a dark portrait of the tormented Halfling (FRI, p. 68):
'All the "great secrets" under the mountains had turned out to be just empty night: there was nothing more to find out, nothing worth doing, only nasty furtive eating and resentful remembering. He was altogether wretched. He hated the dark, and he hated light more: he hated everything, and the Ring most of all.'
In Tolkien: A Cultural Phenomenon, Rosebury somewhere writes (in effect) that, when it comes to evil characters, Tolkien is adept at creating 'states of personality, or unpersonality, that no sane reader would envy.' Put another way, Tolkien's devils (so to speak) are actually diabolical. No one would want to be like them, whereas even a greater author than he, Milton, made his Satan a more attractive, if pridefully rebellious, figure than God, although C. S. Lewis's A Preface to Paradise Lost helps us see through the glamour given Satan by Romantic critics such as William Blake, who famously wrote that Milton was of Satan's party without knowing it. (Rosebury mentions Milton, and gives another example, that of the wicked Count Fosco in The Woman in White, who is genial, wealthy, and amusing, in contrast with the bland and unsympathetic would-be heroes of the work.)
Gollum's motives are not much different than those of Milton's Satan. Pride and greed are the source of his downfall, as they are with Milton's Satan, although he is, of course, an altogether meaner creature. As the chilling description of his life by Gandalf shows, Gollum's lust for uncovering secrets led to the realisation that no such 'great secrets' are there to be found: Gollum forsook joy, and light, and life, and the mystery inherent in community and companionship, for nothing more than 'empty night' and for 'nasty furtive eating and resentful remembering.' This has the taste of hellishness to it.