What to Say When Something Pleasing or Displeasing Happens
كَانَ النَّبِيُّ صلى الله عليه وسلم إِذَا أَتَاهُ الْأَمْرُ يَسُرُّهُ قَالَ: ((الْحَمْدُ لِلَّهِ الَّذِي بِنِعْمَتِهِ تَتِمُّ الصَّالِحَاتُ)) وَإِذَا أَتَاهُ الْأَمْرُ يَكْرَهُهُ قَالَ: ((الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ)).
When something pleasing happened to the Prophet (peace and blessings of Allah be upon him), he would say: "Praise be to Allah by Whose favor good deeds are accomplished." And when something displeasing happened to him, he would say: "Praise be to Allah in every circumstance."