Please pray that the devil will not tempt him at the end, and that he will skip purgatory. That is my prayer for him.
Here is something I posted in another thread, which may console you as it would explain why Our Lord in His infinite wisdom and clement providence, has allowed your husband to undergo such unspeakable horrors: tribulations which you and your family share:
A Catholic who is noteworthy in the annals compiled by historians and lived a millennium or so ago may still be in Purgatory right now if he died in the state of grace but had one mortal sin or more duly absolved but for which he could not atone or make reparation.
Remember that Our Lady of the Rosary at Fatima told the shepherd children that a departed peer of theirs was to burn in Purgatory until Doomsday: what could a young girl in the rural countryside of one of the most Catholic countries in Europe (at that time) have done to deserve such a severe sentence?
One mortal sin alone, though duly absolved, according to St. Gertrude the Great and other Saints, can lead to a soul's imprisonment amidst the flames of Purgatory until Doomsday, for the malice of one mortal sin is infinite as it is an affront to the infinite sanctity and majesty of Our Lord, and the infinite graces He won for us during His Sacred Passion and distributed by the pure hands of the great Mother of God, the Mediatress of All Graces.
The just soul itself, separated from the body and immediately apprehending all things in the light of God's wisdom, would plunge itself in the flames of Purgatory as long as it takes before it is pure and worthy enough to appear before the Lord God whom it loves and for whom it yearns with all its energies. This same love and yearning serve to intensify the pains and purification of Purgatory all the more, because the soul at once loves God and yearns for His beatific embrace, and yet detests the stains of sin and longs to be thoroughly cleansed therefrom, making Purgatory a willing debt to be paid but with great pain and love.
However, such a soul does not merit thereby, because at death the soul cannot merit or demerit anymore. Purgatory is to be avoided by cultivating the interior life unto the ever-persevering progression through the purifying trials that are the threshold of the illuminative and unitive ways of the spiritual life: it is the life of mystical prayer which is the presage of heavenly beatitude and the state of the Saints' souls at death, who immediately transverse from this sublunary prison unto the celestial eternities of the beatific vision. This is the normal development of the life of prayer and grace, according to the teaching of Sts. Thomas Aquinas and John of the Cross, amongst others, as explained by such eminent theologians as Rev. Fr. Reginald Garrigou-Lagrange, O.P.Like the holy Martyrs whose horrendous tortures served to purify their senses and souls and enter into the mystical ways of prayer and grace as they were being executed, so the victims of such devastating illnesses such as cancer are given the opportunity to hasten unto a more intense life of prayer and grace.
Even if the person cannot but say the Holy Names of Jesus and Mary, such devout acts in the midst of terrifying pains will be a Purgatory upon earth.
Just pray at his side every day, and read to him from the works of the Saints and other approved authors. This will also serve as an illustrious example for your children and their families.
With my own eyes I have seen how much fruit such a practice has borne, so that to this day the children of the families of the dying matriarchs and patriarchs of our family remember the prayers and spiritual readings that my parents offered by their bedsides.