You can recite this dua, which is narrated by Imam Ali.
«إِلَهِي كُلَّمَا أَنعَمتَ عَلَيَّ بِنِعمَةٍ قَلَّ لَكَ عِندَهَا شُكرِي وكُلَّمَا ابتَلَيتَنِي بِبَلِيَّةٍ قَلَّ لَكَ عِندَهَا صَبرِي فَيَا مَن قَلَّ شُكرِي عِندَ نِعَمِهِ فَلَم يَحرِمنِي ويَا مَن قَلَّ صَبرِي عِندَ بَلَائِهِ فَلَم يَخذُلنِي ويَا مَن رَآنِي عَلَى المَعَاصِي فَلَم يَفضَحنِي ويَا مَن رَآنِي عَلَى الخَطَايَا فَلَم يُعَاقِبنِي عَلَيهَا صَلِّ عَلَى مُحَمَّدٍ وآلِ مُحَمَّدٍ واغفِر لِي ذَنبِي واشفِنِي مِن مَرَضِي – إِنَّكَ عَلى كُلِّ شَيءٍ قَدِيرٌ»
Translation:
My Lord, whenever you grace me with grace, my thanks was very little, and whenever you plague me with a plague, my patience was very little, Oh lord those who despite when my thanks to him were very less at the event of his grace, he did not deprive me, and those who despite my patience at the event of his plague was very little, he did not let me down, and those who saw me for sins did not let me go, and who ever saw me for sins, he did not punish me for it, Pray for Muhammad and the family of Muhammad and forgive me for my guilt and treat me from my illness – you are for everything capable