Everyone goes thro bad times, this life is a trial.
I went thro a period where I was wondering this very thing. I actually started really honestly doing istighfar and I meant it from the heart with every fibre of my being. I remember walking down the street and thinking you must Forgive me please forgive me, how can I face you if you are so angry with me? And I actually completely broke down in the middle of the streets in tears.
I then told a close friend that I thought that Allah must be so so so angry with me and I couldn't face it. I can face down everything and nothing bothers me but the thought that Allah was so angry with me that this life was made a trial in such a way that I couldn't see a way out then how could I face him and if I couldn't look forward to our meeting then I really didn't want anything at all. And I asked her to make duas for me.
But she reminded me that Allah sends us trials to bring us close to him, he tests us it is a promise he has made, he tested his own messengers he will similarly test us.
Jonah (AS) was swallowed by a whale and separated from his family.
Yusuf (AS) was separated from his beloved father during childhood and reunited only in his middle age.
Ayoub (AS) was atripped of everything from wealth, children and health he was stripped of it all after havign had it all, which surely must be a whole heap worse than never knowing what you're missing.
Ibraheem (AS) was thrown into a fire (imagine the prospect of being burnt in a real fire?), he was ordered to abandon his child and wife in the desert, he was ordered to sacrifice his beloved son
Ismael was demanded as a sacrifice at the hands of his own father.
Our beloved Prophet (saw) went thro trial after trial after trial, he was orphaned in babyhood, he lost all those who loved and protected him at a young age ie grandfather, he was chased out of towns and even his beloved home, he was stoned, abused and taunted as were his first followers.
Wouldn't Allah then on balance also try us?
I now just look at it like well such and such happened to Khadeeja, or Aaasiya or Mariam and it's also happened to me and it makes me love them more and perhaps Allah will grant me company amongst them in paradise because we are similar in this at least.
I also try and do istighfar as much as possible and try to do nafl acts which will please Allah. And I make duas that Allah call me back to him when he will be most pleased with me.
It's not trials we should fear, its our own response to them.
Trials are not there to punish us they are a blessing from Allah, we get to compensate for our sins in this life (thinking about it seriously do you want to compensate for your sins in the hereafter?). We are also reminded of Allah's blessings on us, we remember Allah with much more isncereity during trials when the good times have made us lazy and complacent (this cannot just be me), they make us reassess our lives and our selves and most certainly for myself, the worst times have made me a better person in my behaviour, I remember how I felt during a period in my life where I was struggling and am always always kind to those who are currently in the place I was years ago because I know my life is but for the grace of Allah. It also helps to sometimes step back and think of the good in your life, things may be bad but there is also so much good.
I recently saw a quote by Mufti Ismail Menk
The Almighty gives us so much without us asking, so if He doesn't give what we ARE asking for He knows it's better for us not to have it
I've never looked at my trials that way, but I think he is right in this absolutely.
Then there's also this truth about trials, that Allah try's those he loves, the harder trials are for those he loves more. I would love that certainty, if I was sure to be amongst the most loved by Allah I'd live this life forever. It's the fear of my own sins that terrify me, not the hell fire but the thought I have made Allah angry with me I can't live with that.
But Allah has promised that his mercy overcomes his anger, he is named Merciful.
He has promised;
O son of Adam, as long as you call upon Me and put your hope in Me, I have forgiven you for what you have done and I do not mind. O son of Adam, if your sins were to reach the clouds of the sky and then you would seek My forgiveness, I would forgive you. O son of Adam, if you were to come to Me with sins that are close to filling the earth and then you would meet Me without ascribing any partners with Me, I would certainly bring to you forgiveness close to filling it."
Say: O My servants who have transgressed against their own souls, despair not of the mercy of Allah. Indeed, Allah forgives all sins. Truly, He is Most Forgiving, Most Merciful. (Surah az-Zumar 39:53)
And when My servants question thee concerning Me, then surely I am nigh. I answer the prayer of the suppliant when he crieth unto Me. So let them hear My call and let them trust in Me, in order that they may be led aright. (surah Baqara 2:186)
Trials don't make you a bad person, it's Allah giving you a chance to come closer to Him, make duas and call on him during Tahajjud and ask him to put your heart at ease.
May Allah grant you ease.