What does it mean to cultivate hope when the doctors say "there's nothing more we can do"? Hopes for a cure have to be set aside. There will be no miracle, no Hail Mary pass, no eleventh-hour wonder. Every specialist has been seen, every possible avenue of treatment or exploration exhausted. All of the tests have been run. What does it mean to pray for healing when the body cannot be healed?
Every Shabbat morning after we read from Torah we offer a prayer called Mi Sheberach, "May the One Who Blessed..." It asks God, Who blessed our ancestors, to bless our sick loved ones with healing. Some years ago at my shul we began using an alternative text. We still ask God to bless those in need of healing of body, mind, and spirit. To be with them, comfort them, strengthen them and revive them.
But not to heal them. Because we recognize that not everyone who is ill can be healed. And as one of my congregants has taught me, asking God repeatedly for healing which we know is never coming can be painful. And it can lead to (entirely understandable) fury at God for not fulfilling the yearned-for wish. Her perspective is actually quite aligned with Jewish tradition, in a certain way. Tradition teaches us not to pray for the impossible, lest we damage our own faith in the Source of blessing.
During the dry season in the land of Israel, it never rains. So all over the world during that season, when we reach the line in our daily prayer which asks God for the nourishment we derive from water, Jews pray instead for dew. Because rain is simply not possible (in the place where our prayers originated), and we don't pray for things which are impossible, perhaps because doing so would be tantamount to "testing" God.
Jewish tradition teaches that when one hears a fire truck going by with sirens wailing, one shouldn't pray "please, God, let it not be my house burning" -- either it is, or it isn't, but the prayer won't change whatever is already real. I learned this when I first studied Mishna several years ago (see Brachot chapter 9) -- one who prays over something which has already happened is praying in vain. Sometimes a medical diagnosis can be like that. All we can change is how we respond to what is.
When a loved one cannot be healed, perhaps a time comes when we stop asking God for healing. We can ask for perspective, for strength, for loving care. We can ask God to be with our loved one and help them find blessings in each day. We can ask for comfort, for some sweetness to mitigate our loved one's suffering or grief. We can ask God to be with their caregivers, and to strengthen the work of their hands. We can ask for what is possible, and that has to be enough.