[Loved Trope] Character is informed that their death is coming, which helps them accept it
Whether it's minutes or years, if it helps a character prepare for their inevitable death, it's this trope.
A) A movie called "The Grey". Liam Neeson is the main character, but a lot of this trope is something he does to other characters (survivors of a plane crash, being hunted by wolves in the snowy wilderness). When another character is dying, Liam Neeson's character doesn't lie to them, but instead asks them to think of their loved ones, which helps them die with something resembling peace.
Liam Neeson's character himself >!realises that he isn't getting out, and being the last survivor, honours his dead comrades and kisses a picture of his deceased wife. Before choosing to go out fighting the alpha of the wolf pack.!<
B) Red Dead Redemption, Arthur Morgan. Getting told that he >!has tuberculosis causes Arthur, in a good honour run especially, to reflect on his life and do more good than he has prior. A lot of characters, especially Charles Smith, tells him that because his time is running short, he at least can act out his final days with clarity and purpose. !<
C) Big Fish. Ewan Mcgregor's character, Edward Bloom, exists in the flashback scenes as a fairytale story version of himself, with some truth thrown in. I really liked the idea of him seeing how and when he dies, which allows him to act without fear and live a full life, cause he knows he dies an old man.
It's not meant to be literal, but it is a good metaphor for living life as best you can, and not limiting yourself when opportunity and change comes knocking.
If I were offered the choice of knowing my unavoidable death, I like to think I'd take it, cause I'm pretty anxiety filled over not knowing anyway, and knowing at least gives one the chance to brace for it and get things done beforehand.