Brief background: We can have a family member, a relative, or a friend on the deathbed. If this person is a believer of Jesus Christ, we can be certain to meet them beyond our life on earth. As, heaven is the eternal destination, of anyone who is in Christ.
But if this loving family member, relative, or friend does not believe in Jesus Christ as his/her Lord and Saviour, the matter is totally different. The passing away of this person can mean totally losing this person.
Hence we should pray for his/her salvation. This is the most precious matter that can happen to this person. The gift of eternal life is the only thing that this person can receive.