"그의 친구가 심장마비로 사망했어요."
Translation:His friend died from a heart attack.
Hm, but if I'm not mistaken (native speakers, please correct me if I am), 사망하다 is quite neutral concerning respect to the deceased person, whereas English "to pass away" is quite respectful. I would expect 사망하다 in formal contexts (it's common in newspaper articles for example). But when speaking of, say, my grandparents or the loved ones of the person I'm talking to, I would choose a more euphemistic expression (probably 돌아가시다, lit. "to go back").
Both "die of" and "die from" are correct.
Die of a heart attack implies the heart attack is the direct cause of the person's death.
Die from a heart attack means the heart attack brings about complications which eventually kill the person.
In general, (으)로 사망했다 = died of; died from; died by; died in
상한 마음으로 사망했다 = died of a broken heart / died from heatbreak
심장 마비로 사망했다 = died of / from a heart attack
자살로 사망했다 = died by suicide
비행기 추락으로 사망했다 = died in a plane crash