。
He grieved, thinking of his departed friend.
Literal
Late friend [object-を] thinking, he [topic-は] grieved
亡き is the literary/classical adnominal form of the adjective 亡し ('dead'), still used today exclusively as a fixed prenominal modifier: 亡き友, 亡き母, 亡き夫. Distinct from the everyday 亡くなった — 亡き is distinctly literary, seen in poetry, eulogies, and formal prose. 思い (stem of 思う) used as a conjunctive is also literary — it's the 連用形 linking form, more formal than 思って.