First a definition: death is the separation of the soul from the body, a phenomenon we can’t know has happened with moral certainty until corruption has begun. “Death” does not mean the cessation of breathing or heartbeat, nor does “brain death” mean that death has occured. The soul isn’t “in” the heart, or “in” the lungs, or “in the brain, or “in” any particular part of the body. The treatment of the dying, the apparently dead, and their organs is goverened by this Truth.
Now, a person confronting death should receive the Sacrament of Unction for the possible restoration of body (His will be done) and, most importantly, soul. This is of prime importance and should never be neglected.
Other ways to help prepare the sick person for death are to pray the Holy Rosary (focusing on the Sorrowful Mysteries), the Divine Mercy Chaplet, to St. Joseph (the Patron of the dying) for a holy death, etc. — with the sick person, if possible, or in such a manner that he can hear you. This includes audible prayer for the unconscious; never think that those who are unconscious or in a coma can’t hear you!
The sick person should have a Crucifix (a St. Benedict Medal Crucifix, if possible) in view, perhaps to hold if he can, and should be encouraged to offer up his sufferings and to trust in the love and mercy of our Lord Jesus Christ. A lit blessed candle, as a symbol of the sick person’s Baptism — a symbol of sanctifying grace and the promise of eternal life — should be placed nearby so he can see the flame (unless oxygen tanks are in use, of course!).
You’ll note that the Catholic way of death is different from that of other “Christian” groups. We don’t try to sanitize it and avoid the topic. We don’t speak in euphemisms about it. We don’t take salvation for granted, except the salvation of the souls of baptized children who’ve died before the age of reason (but we, of course, trust in the mercy of God for all others). And we don’t consider it a sin or, at the least, a faux-pas to mourn. While we don’t exactly “sit shiva,” we don’t see jumping up and down and singing happy songs as the natural reaction to having to miss someone until one’s own death. In other words, it’s OK to rend garments and weep; these things are not expressions of a “lack of faith,” but are normal, natural reactions to the evil of death, and to missing someone and realizing that it will be some time before you see him again, Deo volente.
It must be remembered that sickness and death are great, great evils; they were not “supposed” to be a part of this world, and came about as a consequence of the sin of Adam. Christ, of course, conquered the tomb and gives us the hope of eternal life. Catholics, then, look at death for what it is — an evil — but cling to the hope He offers, trusting in His Divine Mercy while also realizing that He is Just. Christ Himself wept before the dead Lazarus.
Now, the sick person shouldn’t be denied the Truth of his situation any more than those around him should lie to themselves. It is not a loving act to ignore reality out of fear of not wanting to alarm the sick one, and to do so is to imperil his everlasting soul. The dying person needs to face his mortality, to repent, to pray, to receive Unction, to be encouraged to trust totally in Jesus and His forgiveness and love, etc. He must spiritually prepare himself for judgement, and to help him do this is the single greatest act of love you can offer.