Is there a macro that can do this?

Add [harm] to the start of the options:

#showtooltip
/cast [harm] [@targettarget,harm,nodead] [] Shadow Word: Death

More advanced version: