He seemed to be sleeping, but in reality he was dead.

Literal

Sleeping [seemed-ようだった] [but-が], in-reality had-died-[progressive-ていた].

ようだった is the past of ようだ. 本当は ('in truth, in reality') contrasts with the appearance. 死んでいた is the past-state form of 死ぬ — a state-of-death, consistent with Japanese's use of ~ている for resulting states even for 'to die.'