St Joseph is the saint most invoked in prayers for such a death, for a Happy Death, a Good Death, however pain wracked.
I cannot understand this concept -- oh, intellectually, I do, but I have such a terror of pain that I cannot imagine myself at the end wanting anything but a release from whatever agony takes me, by whatever means.
This isn't good, I know.
I do not know how to pray for others either, I do not know what to say to good when someone is near death.
I am in an even greater state of bafflement since the death of the person most dear to me in all the world. The loved ones of the dying want miracles. Miracle? what miracle would I pray for? what miracle would God grant, Who didn't grant that which I asked for before?
He's not going to make an exception in your case.
He will not grant a miracle.
And yet -- I know He can, He does... Lord, I believe , help my unbelief.
"Go forth, Christian soul, go forth in the name of the almighty Father who created thee, in the name of Jesus Christ, the Son of the living God, who has suffered for thee, in the name of the Holy Spirit, who has been given to thee, in the name of the glorious and holy mother of God, the Virgin Mary, in the name of blessed Joseph, her spouse, in the name of the angels and archangels, the thrones and dominations, the principalities and powers, the cherubim and seraphim, in the name of the patriarchs and prophets, in the name of the apostles, the evangelists, the martyrs, the confessors, the virgins, and of all holy men and women of God. May thy dwelling today be in peace, in the heavenly Jerusalem, with Jesus Christ, our Lord. Amen."