That is a good question.  In my research, I copied this from a Roman Catholic Internet site.  I did this to be sure what I write is true according to their own writers.  Note that this act of Last Rites must be administered by a Roman Catholic Priest.  Their writings state: 

“The moment of death is arguably the most significant event in the life of a believer. The (Roman) Catholic Church, a two-thousand-year-old institution, has rich traditions that guide its followers through this profound experience. One of the most vital components of Catholic end-of-life practice is the Last Rites. This article aims to unravel the mystery, significance, and proper understanding of the Last Rites in the Catholic tradition.  The term “Last Rites” generally refers to the sacramental actions and prayers that the Church provides to those who are dying. Primarily, the Last Rites consist of three essential elements:

  1. The Sacrament of Penance (Confession)
  2. The Anointing of the Sick
  3. The administration of Viaticum, which is Holy Communion given at the point of death.”
  • The Sacrifice of Penance provides the dying person an opportunity to repent for their sins and be reconciled with God.
  • The Anointing of the Sick states that this sacrament “provides the sick person grace for the state that he is entering” and gives “a gift of strengthening peace and courage to overcome the difficulties that go with the condition of serious illness or the frailty of old age.”
  • The administration of Viaticum, a Latin term meaning “food for the journey” is given to the dying person.  He receives Holy Communion, thus partaking in the Body and Blood of Christ as they prepare to transition from this life to the next.

Now that we know what the Last Rites (also known as the Commendation of the Dying) are, we need to consider if this is a Biblical teaching. First of all, this ritual is not found in the Bible.  Let’s look at each of these three actions and see if they agree with the Bible.

Reconciliation with God does not come through a procedure performed by a Catholic priest.  Notice that this rite is performed on supposed believers.  True believers have already been reconciled to God.  We read of the Lord Jesus in Hebrews 2:16-17, “For verily he took not on him the nature of angels; but he took on him the seed of Abraham. Wherefore in all things it behoved him to be made like unto his brethren, that he might be a merciful and faithful high priest in things pertaining to God, to make reconciliation for the sins of the people.”  The work of reconciliation is a work done singularly by the Lord Jesus Christ.  He has reconciled all believers to God by giving Himself as the one perfect sacrifice able to put away our sins.  Once we put our faith in the Lord Jesus as our savior and Lord, we are reconciled, once and forever. 2 Corinthians 5:18 tells us, “And all things are of God, who hath reconciled us to himself by Jesus Christ…”  While the life of a believer should include confession of our sins often, this is to maintain our fellowship with the Lord.  Once we have Christ as our savior, we are saved for all eternity.  “Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me, hath everlasting life, and shall not come into condemnation; but is passed from death unto life.” (John 5:24).

The prayer and anointing of the sick is found in the Bible, but it is administered by elders, not priests, and it is for the purpose of healing, not to give grace to the dying. We read in James 5:14-15, “Is any sick among you? let him call for the elders of the church; and let them pray over him, anointing him with oil in the name of the Lord: And the prayer of faith shall save the sick, and the Lord shall raise him up; and if he have committed sins, they shall be forgiven him.” 

Holy Communion is given as food for the journey of the dying.  The one purpose of the communion service is to remember the Lord and the death He has died for us.  We read in 1 Corinthians 11:24-26, “And when he had given thanks, he brake it, and said, Take, eat: this is my body, which is broken for you: this do in remembrance of me. After the same manner also he took the cup, when he had supped, saying, This cup is the new testament in my blood: this do ye, as oft as ye drink it, in remembrance of me. For as often as ye eat this bread, and drink this cup, ye do shew the Lord’s death till he come.”  This sacred service is to acknowledge and remember the wonderful work of the Lord Jesus on the cross as He died as payment of our sin debt.  NOWHERE is it ever mentioned as giving energy to one dying.  That is NOT what the Lord intended this to be.

So, it seems to be clear that the Last Rites are simply traditions of the Roman Catholic Church and have no merit from the Word of God.  What should a believer do if he realizes he is at the point of death?  Perhaps the words of the Apostle Paul will help us achieve the proper attitude and peace.  He wrote in Philippians 1:21, “For to me to live is Christ, and to die is gain.”  We also have the words of Stephen at the moment of his death as he was being martyred for his faith in the Lord.  “And they stoned Stephen, calling upon God, and saying, Lord Jesus, receive my spirit.”  (Acts 7:59).  (CC)  (632.6)