Anas bin Malik reported,

The Messenger of Allah ﷺ visited a Muslim man who had grown so weak and frail that he resembled a young chick. The Messenger of Allah ﷺ asked him, "Were you supplicating for anything or asking Allah for something?"The man replied, "Yes, I used to say, 'O Allah, whatever punishment You would inflict upon me in the Hereafter, hasten it for me in this world.'"The Messenger of Allah ﷺ said, "Glory be to Allah! You cannot bear it, you do not have the strength for it. Why did you not instead say, 'O Allah, grant us good in this world and good in the Hereafter, and protect us from the punishment of the Fire'?"Then he supplicated to Allah for him, and Allah healed him.

Azami 10952

Sahih

عن أنس

أن رسول الله ﷺ عاد رجلا من المسلمين، قد خفت فصار مثل الفرخ، فقال له رسول الله ﷺ: هل كنت تدعو بشيء أو تسأله إياه؟ قال: نعم، كنت أقول: اللهم ما كنت معاقبي به في الآخرة فعجله لي في الدنيا، فقال رسول الله ﷺ: سبحان الله لا تطيقه-. أو لا تستطيعه- أفلا قلت: اللهم آتنا في الدنيا حسنة، وفي الآخرة حسنة وقنا عذاب النار؟ قال: فدعا الله له، فشفاه.

الأعظمي 10952صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Dislike of supplicating for hastening punishment in this world
Numbering
Jami al-Kamil 10952 (2nd edition)
Azami 10952