Schadenfreude
is a loanword from German, composed of
"Schaden" - damage, loss, scathe (viz unscathed - "unbeschadet")
"Freude" - glee, joy, happiness, fortuneate surprise
This is rather negatively connotated.
For a well intended joke after tragedy concider
comic relief
relief