Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad-zuhd:456ʿAbdullāh > Bī > ʿAffān > al-Mubārak b. Faḍālah > al-Ḥasan

[Machine] I heard Al-Hasan say, "The Prophet Dawud ﷺ used to say, 'O Allah, neither afflict me with a debilitating illness nor grant me such good health that I forget You, but choose something in between.'"  

الزهد لأحمد:٤٥٦حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنِي أبِي أَخْبَرَنَا عَفَّانُ حَدَّثَنَا الْمُبَارَكُ بْنُ فَضَالَةَ قَالَ

سَمِعْتُ الْحَسَنَ يَقُولُ كَانَ دَاوُدُ النَّبِيُّ ﷺ يَقُولُ «اللَّهُمَّ لَا مَرَضًا يُضْنِينِي وَلَا صِحَّةً تُنْسِينِي وَلَكِنْ بَيْنَ ذَلِكَ»