Coincidentally, I just read this relevant essay on suffering / why suffering may have purpose(s). One of many related lines is "The goal isn’t to feel sad but to process our loss sufficiently that we are able to replace the loss well." https://medium.com/the-infinite-universe/we-need-to-suffer-for-life-to-have-meaning-326aad305700
Along a similar vein, "the thing you lost is the same thing that can stop that pain." That is from the second clip from Ricky Gervais's very spiritual (but from an atheistic perspective) series After Life in this set of writing prompts from me: https://medium.com/promptly-written/spiritual-prompts-5-29-thru-6-4-2f65ac86dfcf