(16) باب قَوْلِ الْمَرِيضِ إِنِّي وَجِعٌ أَوْ وَارَأْسَاهْ، أَوِ اشْتَدَّ بِي الْوَجَعُ
Narrated Al-Qasim bin Muhammad:
`Aisha, (complaining of headache) said, "Oh, my head"! Allah's Messenger (ﷺ) said, "I wish that had happened while I was still living, for then I would ask Allah's Forgiveness for you and invoke Allah for you." Aisha said, "Wa thuklayah! By Allah, I think you want me to die; and If this should happen, you would spend the last part of the day sleeping with one of your wives!" The Prophet (ﷺ) said, "Nay, I should say, 'Oh my head!' I felt like sending for Abu Bakr and his son, and appoint him as my successor lest some people claimed something or some others wished something, but then I said (to myself), 'Allah would not allow it to be otherwise, and the Muslims would prevent it to be otherwise".
Reference: Sahih al-Bukhari 5666
In-book reference: Book 75, Hadith 27
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 7, Book 70, Hadith 570