Holden goes to Central Park in New York City, and sits by the frozen pond where, in the Spring, the ducks would be swimming. He is despondent, having left the hotel because of his confrontation with Maurice. He sits there thinking that he could get pneumonia and die.
He starts to think about his death and his funeral, who would attend, then he remembers that his mother is still mourning the loss of her son, Allie. The thought of his sister Phoebe being sad at his death is what stops Holden from staying in the park and freezing to death.
It is his love for his sister that keeps Holden from committing suicide.
Salinger describes several instances indicating Holden's masochistic attitudes, such as his admission that his favorite character in the Bible is one who mutilates himself. These details accumulate throughout Chapter fourteen to Holden's final revelation that he is considering suicide. Holden feels like committing suicide by jumping out the window, but he wouldn't want people looking at his gory body on the sidewalk. Although he finally dismisses the idea of jumping out the window because of the particular details of his death, this is a clear sign of Holden's despair. Salinger clearly foreshadows that Holden will engage in some suicidal action, possibly the reason why he is in psychiatric care as the book begins.
The second death mentioned in the book was the suicide of his schoolmate, this death instead of causing a permanent effect on Holden as the death of his brother’s did, it helped shaped up his mind/opinion about the people around him, and also caused him to more or so run away from the idea of suicide, because he didnt like the idea of people looking over his body without helping. Also every time he seems to be thinking about death his little sister Phoebe pops up in his head. When he was nearly frozen at the pond and thought he was going to die, the idea of his sister missing him, caused him to risk visiting her in order to see her "one last time".