warm milk, a sweet lullaby generally does it. In Season 9 my players hired a ghost to work the cash register in their bar.
Revnants usually stalk their killer. I had a fun experience once with my gaming group. They corned this rival group and told them to surrender all their gear or die. Wasnt much of a choice and the group chose to fight. I had the leader come back as a revenant. The PCs tried to argue they didnt "murder" the leader the killing was justified...Revnants are undead that come back because of something in their past. You can put them 'to rest' if you resolve their issue.
A regular ghost as a story hook can serve this purpose as well.
There's a plot point like this in Rise of Tiamat.Are there any published adventures with this idea as a plot point?
There is a common trope in movies about helping a ghost or other undead creature to move on and "go into the light", so it never harms the living again. I never seem to see this in games. In RPGs the answer to an undead problem is always combat related. Have you ever helped an undead creature find closure and move on to its afterlife? Are there any published adventures with this idea as a plot point?

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.