David Rakoff, a prizewinning humorist whose mordant, neurotic essays examined everything from his surreal stint portraying Sigmund Freud in a Christmastime shop window display to his all-too-real battles with cancer, died on Thursday in Manhattan. He was 47.

His death was announced by his mother, Gina Shochat-Rakoff. Mr. Rakoff’s cancer had first appeared when he was 22 and recently reappeared as a tumor in his left shoulder.

The return of his cancer, and the possibility that his arm and shoulder would have to be amputated, were the subjects of the concluding essay in Mr. Rakoff’s most recent collection, “Half Empty” (2010), a darkly comic paean to negativity.

For his incisive wit and keen eye for the preposterous, Mr. Rakoff (pronounced RACK-off) was often likened to the essayist David Sedaris, a mentor and close friend. Like Mr. Sedaris, he was a frequent contributor to “This American Life,” broadcast on public radio.