Strictly an epitaph is an inscription for a gravestone, but it can also mean any short verse or statement in memory of the dead. Some people write their own:
If anyone at my funeral has a long face, I'll never speak to him again.
— Stan Laurel
I told you I was ill.
— Spike Milligan