Blessed are You, O God ... Who has provided me my every needs (Siddur).
One of the great tzaddikim lived in abject poverty, yet always had a happy disposition. He was asked how he managed to maintain so pleasant an attitude in the face of such adverse conditions.
"Each day I pray to God to provide all my needs," he said. "If I am poor, that means that one of my needs is poverty. Why should I be unhappy if I have whatever I need?"
Tzaddikim are great people and we are little people who may not always be able to achieve the intensity of trust in God that would allow us to accept adversity with joy. But even if we cannot attain it to the highest degree, we should be able to develop some sincere trust.
When our children are little, we as parents know what they need. They might prefer a diet of sweets, but we give them nourishing foods. They certainly despise receiving painful injections that immunize them against dreadful diseases, but we forcibly subject them to these procedures because we know what is good for them.
Some people do not believe in God. But to those that do, why not realize that He knows our needs better than we do, and that even some very unpleasant experiences are actually for our own betterment?"