Kerouac wrote Big Sur as an allegory of his experiences with his fellow Beat Generation authors. The events of the story are not autobiographical, but the characters are based off of himself and his friends. Jack Duluoz is essentially Kerouac incarnate in his own writing. With these parallels in mind, the novel takes on an additional depth because these men and women lived troubled lives. The things Kerouac addresses in this novel most likely were issues that he struggled with in his own.
Jack Duluoz is a psychotic hippy on the very of a mental breakdown. At his friend's suggestion, he goes to a cabin in Big Sur in order to put some distance between him and the chaotic environment of New York City where he lives. While there, his fear of death, psychosis, jealousy, loneliness, and regrets all become more intense. Effectively, whatever he hoped to gain from his journey into the wilderness, he gets the opposite. So he tries two more times, but now he brings his friends along with him.
Jack soon realizes that even when he's surrounded by people that know and care about him, his mental struggle is just as troubling. He's terrified of dying and sees death reflected in everything around him. While he struggles with jealousy and loneliness, they are the products of his own insecurities. When he's with Cody, he only becomes more aware of how unhappy he is with himself. He feels trapped in an identity which he can never effectively communicate to people. He desperately needs for someone to see that he is not what his appearance or lifestyle suggest. Obviously depressed, nothing satisfies Jack's inner desire. He doesn't even know what he's looking for, but he needs to find meaning in something.
All of this anguish, manifesting in various outbursts and delusions, finally culminates in Jack's third visit to Big Sur. Surrounded by his friends and lovers, he loses his mind. He spends one entire night dreaming, tripping, and panicking. Years of unaddressed depression and psychosis coupled with a preceding week of drinking, not sleeping, and overall poor health, leave Jack mentally crippled. He wrestles all night long with his deepest fears and desires. By morning, he is well once again. He says he will be fine. He plans to return to New York.
Kerouac's discussion of mental health and identity is potent and insightful. He explores the complex nature of psychology, how multiple facets fit together to form how the brain responds to stimuli. While drugs and alcohol play a role in Jack's delusions, he really does lose touch with reality. Kerouac belongs to a generation which felt misplaced and misunderstood. They chose to live unconventionally and reject the establishment, but they experienced a lot of turmoil and isolation because of that choice. Any reader can conclude that Jack has not completely subdued his mental anguish by the end of the book, but he has found hope, meaning. Kerouac is essentially reaching through the pages to grab someone's hand and say, "Hey, your story doesn't end here."