Mr. Shernoff was a psychotherapist who beginning in the early years of the AIDS epidemic wrote widely on its emotional toll on gay men.