(This is just a rephrasing of the idea posted on the blog of Br. Ahmad Deif--yes, I'm hijacking his post)
In Surah Saad, Allah (swt) says of two individuals, “How wonderful a servant! He returned often in repentance.” In all of the Quran, this description is only mentioned of these two individuals. Who were they?
Ayyub, may Allah be pleased with him! The prophet who was struck with such calamity that it retell his story again and again, awed by his patience. All of his children died–how painful the loss of just one! Stricken with disease and abandoned by all but his wife, people ran from him, afraid of contagion, and shook their heads in condemnation. They said that this Prophet must have deserved Allah’s wrath, so severely was he tested. This continued for 18 years, and Ayyub responded only with adoration of His Lord, thankfulness for the years he had spent in prosperity, and worship.
And Sulayman, may Allah be pleased with him! The Prophet and king who asked Allah to “bestow upon me a kingdom such as shall not belong to any one after me.” Allah gave him the ability to command the wind, which “blew gently by his order wherever he willed,” the animals, “who did his every bid” and the jinn, who built structures and dived under the sea. Unimaginable wealth and powers!
How is it that two men, two prophets, of such different situations, merit the same title from Allah: “How wonderful a servant!” (Ni’m al-Abd)
This is testament that the circumstances of the Muslim are irrelevant–it is the state of the heart that matters. Whether one is tested with trial or prosperity, tested with character or illness, it is your relationship with Allah throughout life that is the crucial element. It is the thankfulness, repentance, humility before Allah, not the outer circumstances, that determines where we stand in His eyes.