How would I recreate this death effect?

You could copy the character that died into a viewport and use masking to get the effect: