Joseph (son of Jacob mentioned in the old testament in the Bible) suffered much in his initial days, even tough his father loved him, his brothers hated him, they sold him as a slave, in Egypt he was wrongly accused and imprisoned, yet in all this, he was strong, for God was with him and Joseph was faithful to God.
"Until the time that his word came to pass,
The word of the LORD tested him."
Psalm 105:19 (New King James Version)
Through the sufferings and pain, Joseph was tested by the Lord, the Lord wanted to see the faithfulness and love of Joseph for Him and thus when Joseph was faithful, the Lord exalted him in Egypt and he became an important minister in the king's palace.
God often allows suffering in our lives to test us, he never intends to destroy us, for God always seeks our welfare.
If we are faithful to God as Joseph was, the Lord will exalt us and bless us above all as he blessed Joseph.
Thus we may go through problems, yet they are to test us and for God to show us His great and awesome love and power in our lives.