The discord between Joseph and his brothers is old news by now. It's been twenty-some years since they sold him into Egypt. The brothers have had time to see their father's grief and regret their decision. Joseph has been through enough that he has some perspective on his brothers' actions as well.
Notice, he says God was in the event when they sold him. He sees the sovereign hand of God in their petty jealousy.
Nothing that happens to us is a surprise to God. Whether good or bad in our eyes, He has known about it from the beginning of time. He is omniscient, knowing everything -- past, present and future.
When life seems totally out of control, when circumstances seem dire in the extreme, the knowledge that God is still sovereign and in charge of all that happens can carry us through the most perilous times.
God gave man a free will in the beginning. While He does not will man to do evil, He can take the most heinous of actions and use it to further His own ends. There is no decision or action of man that is irredeemable in His sight.
The knowledge that God can bring ultimate good out of temporal evil can carry you through any tragedy or trial. Just remember, God is in charge.
When life seems to spiral out of control, remind us that You are the author of all things. That while man can be evil and disobedient, nothing is totally irredeemable.
In Jesus' most precious name.