The Prophet (ﷺ) said: “Whoever was stricken with a calamity and when he remembers it he says ‘Inna lillahi, wa inna ilayhi raji’un (Truly, to Allah we belong and truly, to Him we shall return),’ even though it happened a long time ago, Allah will record for him a reward like that of the day it befell him.”
Sunan Ibn Majah Book 6, Hadith 168