In Catcher in the Rye, Holden suffers from sadomasochistic fantasies derived from three sources: gangster movies, Allie's death, and James Castle's suicide.
Holden deliberately provokes attacks from Stradlater and, later, Maurice in order to relish in his own blood spilled. Holden has violent fantasies and considers suicide, but he can't bring himself to do it. He repeatedly calls himself a "coward" and a "pacifist." Instead, he lets others beat him up to punish himself for his own feelings of survivor's guilt (from his brother's death), depression, and cowardice. This is a psychological condition that shows Holden's emotional imbalance.
In chapter 14, after Maurice punches him, Holden role-plays a movie gangster pretending to be shot in the gut, a masochistic homage to film noir. Holden depicts his own stylized death scene, patterned after a gangster-film hit, all indicating that Holden is caught between an abhorrence and a love affair with death. In short, he wants to be frozen in death, the same way Allie, James Castle, the exhibits in the Museum of Natural History, and the fish in the frozen Central Park pond are all frozen in time.
Holden is also obsessed with James Castle's suicide. James Castle (initials "J.C." for Jesus Christ) is Holden's doppelganger, his hero, the biggest non-phony in the book. Instead of taking abuse from others, Castle fell to his death rather than take back “conceited.” Holden tries to romantically relive Castle's actual death by provoking others to make him suffer. Castle is Holden’s martyred saint whom he desperately wants to imitate, but can't.