Have you ever had a bad situation turn out to be the best thing that could have ever happened to you? Joseph was thrown into a pit, sold into slavery by his brothers, and was thrown into prison for something that he didn't do. His brothers meant to do evil, but God used the situation for good. Joseph in the end saved many people from starvation.
"But as for you, you meant evil against me; but God meant it for good, in order to bring it about as it is this day, to save many people alive.
Are you going through trials and tribulations? God has a plan for you. You may not see it right away, but God is working. If you can't trace His hand, trust His heart.