Immediately a verse came to mind. I grabbed a Bible off my desk and opened to James 1:2-4. NIV
2 Consider it pure joy, my brothers and sisters,whenever you face trials of many kinds, 3 because you know that the testing of your faith produces perseverance. 4 Let perseverance finish its work so that you may be mature and complete, not lacking anything.
I think we've all grappled with this question at one time or another. Are there any other verses that have helped you in answering this question?