From the Greater to the Lesser
God only ever wants what is best for those who are in Christ. No matter what the circumstances or how difficult things may seem, he promises it is for our good and his glory.
The Bible offers proof of this. Consider the following passage from Paul's letter to the Romans:
 What then shall we say to these things? If God is for us, who can be against us?  He who did not spare his own Son but gave him up for us all, how will he not also with him graciously give us all things? (ESV)
Paul is making the point that since God has not spared his Son, he will surely not hold anything else from us. It is an argument from the greater to the lesser, or what is known as an a fortiori argument. He has done the harder thing (giving up his Son), so he will surely do the easier thing (in context, help us persevere our final glorification when we will be like Jesus).
James uses a similar argument when trying to defend God's goodness in the midst of trials. People in the church that James was writing to were in danger of blaming God for their temptation and sin. James tells them that God cannot be tempted so he will not tempt anyone. Then he offers another argument.
 Do not be deceived, my beloved brothers.  Every good gift and every perfect gift is from above, coming down from the Father of lights, with whom there is no variation or shadow due to change.  Of his own will he brought us forth by the word of truth, that we should be a kind of firstfruits of his creatures.
James is saying “You think God is tempting you. No, God only ever gives you good things, not evil. Look, he gave you the greatest gift of salvation, through giving up his Son, and if that is how good he is then he must be good all the time and will not tempt you.” He has given you the greatest thing (the gift of salvation) so everything else he gives will also be good.
John Piper gives this illustration:
So suppose you say to your child, “Please run next door and ask Mr. Smith if we can borrow his pliers,” and your child says, “But what if Mr. Smith doesn’t want us to borrow his pliers?” Your a fortiori argument to him might be: “Yesterday, Mr. Smith was happy to let me borrow his car all day long. If he was happy for me to borrow his car, he’ll be very willing for us to borrow his pliers.”
So consider what God has done for you. He has done the greatest, most miraculous things for you, in giving up his son, granting you new life, in forgiving your sins. If he has done all this (and much, much more), you can be sure he is going to be with you and help and preserve you until the end. It might not always look like it but that is why we are told these things in scripture - propositions and promises to hold onto when life seems hard.