It is narrated from Imam Ali (AS) who said: Do not be overjoyed for attaining the wealth of this world; if you become wealthy, do not be too happy and if you feel in your life you do not have any problems and everything is perfect and there is no complex issues or you have no difficulties, do not be happy for this situation. On the other hand, if the opposite happens, if your hands are empty, do not be sad, if you have shortages in finance, do not be uneasy, if you have difficulties in your life and have been inflicted with a calamity, do not be sad. Therefore, neither become overjoyed by wealth and comfort nor too sad and unhappy by poverty and calamity [1].
[1] Qorarul Hekam, Page 99, Hadith 1716.
Source: Website of Ayatollah Sheikh Mojtaba Tehrani
source : SHAFAQNA