Romans 8:28: “And we know that in all things God works for the good of those who love him, who have been called according to his purpose.”
A lot of bad things may happen in life of a righteous person. He himself might ask whether God really cares when troubles come his way. There should not be any place for doubt regarding these things as God knows how to turn any situation upside down. He knows how to turn your loss to victory, your sorrow to joy, and your disappointment to hope and make the bright sun shine through thick and dark clouds.
He cares for those who love him and wait for his salvation. He has a plan how to get you out of any problematic situation. The only thing God wants from you is to keep on trusting him. This unleashes his power in your life and solves your problems. Learn to walk by faith and continue loving your God. You will be redeemed sooner or later. I believe it will be sooner rather than later. Dwell on this and other comforting verses from the 8th chapter of Romans when you are oppressed by difficulties as it will help you to keep peace in your heart and hope in your mind. May God help you!