Shama-il Tirmidhi Chapter 053, Hadith Number 004 (371).

'Aayeshah Radiyallahu 'Anaha narrates: "After witnessing the difficulties experienced by Rasulullah Sallallahu 'Alayhi Wasallam, I do not doubt that anyone does not experience difficulties at the time of death".

Commentary
Intense illness is a means of decreasing the sins of one's evil deeds, and increasing in the blessing of that person, Intense illness being a reason for death makes one utter more istighfaar and prepare for death.