Candy's 'greatest fear' (chapter 5) is losing the chance to live with George and Lennie on their own ranch.
For a time, George and Lennie allow Candy to share their dream of settling down on their own place. Candy is old and lonely with no companionship save that of his old dog. When the dog is put down, Candy has no-one. However, he overhears George and Lennie discussing their dream and asks if he can join in. This would be an escape route from his lonely, aimless life.
However, the dream of the ranch is dead by the end of the novel, when Lennie accidentally kills Curley's wife. Lennie will now be hunted down; it is the end of his freedom, and the end of George's hopes. George cannot imagine getting a place of his own without Lennie. So that dream is over, and Candy too has nothing more to look forward to.
Candy is overcome with sadness and disappointment, and he takes his emotions out on Curley's dead wife, calling her a lousy tart' (chapter 5), and begins to cry. This shows just how upset he is. After the other men have gone to look for Lennie, Candy is left alone in the barn with the dead girl:
Old Candy lay down in the hay and covered his eyes with his arm.
Candy has now lost all hope; with this final image of him lying in the hay, he appears like a corpse himself.