I am certain you expect the first answer to be meditation, and it is. Loss and grief require comprehension, which can only be gained by profound meditation on those experiences.
Your thoughts and prayers reach the recently deceased. Try to avoid radiating sorrow and regret, which intensifes their suffering. To help them, send them encouragement to let go of attachment, and to become aware of themselves so they may have a chance to stop repeating their mistakes.
These topics are discussed in this book:
“Nothing is easier than self-deceit. For what each man wishes, that he also believes.” —Demosthenes
"Do not worry; cultivate the habit of being happy." —Samael Aun Weor