Rabbi Meir Shalom of Porisov used to say that suffering need not deter us from serving the Almighty. King David wrote beautiful and uplifting Psalms while he was in the most difficult situations.