Tolkien regularly denied that LOTR was a mere analogy for anything, because he disliked simplistic similes and metaphors. He believed a story should stand on its own, and that the world a writer created should take on a life and reality of its own. To him, Frodo is diminished if he’s seen simply as a symbol for Jesus and the Shire is cheapened if we see it as a metaphor for England. And yet, there’s little doubt that MUCH of what we read in LOTR is inspired by Tolkien’s devout Christianity and his own experiences in World War I.
Tolkien came home from World War I suffering from “shell shock” (today, I suppose they’d call it “post-combat stress fatigue”). He’d seen most of his closest friends killed in the war, and like many veterans of horrible wars, he found himself unable to resume a normal life for quite some time. In THAT regard, at least, Tolkien was not unlike Frodo at the end of LOTR. He’d given every ounce of his strength to fight against an enemy that he firmly believed had to be defeated… but found, upon his return home, that his life could NEVER be exactly as it was.
Moreover, it’s worth remembering that LOTR was completed and released after the SECOND World War. The post-war years were difficult, in England. The British soldiers who’d spent years fighting Hitler came home to a land that had been devastated by the Luftwaffe, a land in which shortages and rationing of nearly EVERYTHING was the norm. Tommy Atkins" probably got through the D-Day invasion by telling himself, “This will be over soon… and I’ll be home, and my Mum will have a pot of tea waiting… can go back to the ol’ pub for a pint and a smoke with my mates…” But when Tommy got home, he found that England was a shell of its old self, a place where he couldn’t easily get even simple things like tea, beer or tobacco.
Oh, MANY of those British soldiers were like Sam Gamgee, and managed to resume a fairly normal life fairly quickly. Others, like Tolkien, were more like Frodo… weary from the war, even weary of life itself.
For what it’s worth, Tolkien DID recover, DID marry, DID have children, DID have a successful career and a conventionally happy family life. ULTIMATELY, he was more like Sam Gamgee than Frodo, in his ability to embrace life again. But he certainly understood, all too well, why Frodo could not.