From the BBC, an examination of how J.R.R. Tolkien's World War I experience influenced The Lord of the Rings, including this focus on Frodo's "shell-shock" back home in the Shire:Share
Shell-shock was prevalent among men on both sides of No Man’s Land, and by the end of the conflict around 80,000 British soldiers had been treated for the condition. Symptoms included vivid hallucinations and nightmares reliving traumatic events, anxiety and depression, emotional numbing and changes in personality.
Tolkien would have been well aware of its effects from his time in hospital and on the front line. He presents a sympathetic view in The Lord of the Rings by afflicting Frodo with the condition while carrying and after having destroyed the Ring.
Even before reaching Mordor, Frodo experiences sudden temporary blindness on a few occasions, a common symptom of shell-shock, and as he gets nearer to Mount Doom he experiences a loss of taste and smell, uncontrollable trembling, exhaustion and bouts of anxiety. (Read more.)