Hakim al-Umma Hadhrat Mawlana Ashraf ‘Ali Thanawi (may Allah have mercy on him) use to instruct the seeker afflicted by something unfavorable that he should contemplate (muraqaba) on the Divine names al-Hakim and al-Hakeem.
Allah, Most High being the Sovereign authority in charge (al-Hakim) has all the right to do with us as He wants. No one can question it. We being His slaves have to accept it. However, at the same time we must remember that He is Wise (al-Hakeem) and whatever He does certainly has something beneficial for us. We may not be able to acknowledge this right away but this is for sure.
Thinking on these lines decreases the apprehensions and sufferings associated with the affliction. Also it increases one’s love and trust on Allah at the same time.