Certainly, you should pray for your friend’s healing, and you should also pray that he will sense God’s presence and peace in the face of death.
Does this sound like a contradiction? Perhaps, but in reality, it isn’t, because what you’re really praying for is that God’s will may be done in his life. Neither you nor anyone else knows the future; in spite of the grim diagnosis your friend has been given, God is all-powerful, and at times God does intervene to reverse situations like this.
But death is inevitable for every one of us, and you should not think your prayers have failed if it’s God’s time for your friend to depart this life. Pray, therefore, for God’s will to be done, trusting that His way is always best. The Bible says, “This is the confidence we have in approaching God: that if we ask anything according to his will, he hears us” (1 John 5:14).
Let your friend know you’re praying for him. But ask God also to help you be a comfort and encouragement to him, by pointing him to Christ and the hope we have of heaven because of Him. If your friend has never trusted Christ, urge him to commit his life to Him today. Then encourage him to look beyond this present life to heaven’s everlasting joy. Then, the Bible says, “There will be no more death or mourning or crying or pain, for the old order of things has passed away” (Revelation 21:4).