He who performs one precept acquires for himself one advocate, and he who commits one transgression acquires for himself one accuser. Repentance and good deeds are as a shield against calamity.
Every life is a mixture of good times and hard times.
My own experience has been that the type of life we lead when times are good helps determine the quality of our life when times are difficult. If we have treated people well, then they will come to our aid when we need help. If we have lived a moral life, then we will still find a source of inner comfort during those dark nights of the soul.