Allah revealed this verse for the patient ones who say it in times of calamity. Depression is a calamity of the inner world. Reciting this verse places your pain in its proper context — a temporary test on the way back to Allah.