Since he was sentenced to death, and the options leaving for him included taking poisonous liquor, hanging himself, stabbing himself with a scissor or a dagger. If he was killed by one of those means mentioned above, it would be lucky for him since he could keep his body intact.
However, he would be beheaded, which meant his head would be chopped off, and his body would be separated from his head, and that was always the fate of a man who had committed obnoxious sin.
Everyone understood that Dr. Shangguan was innocent, but even if he was, what then? Over half of the people who died in the palace every year were innocent.