Not everything that goes wrong is necessarily your own fault or a result of your mistakes and sins, and trials are not necessarily always because you're being punished. Sometimes it's just an attack of the Devil, who is trying to defeat you, trying to belittle and trying to accuse, trying to get you down and discouraged and trying to make you quit. He tries to convince you that you've made too many mistakes, too many failures and you might as well quit!
But God always has hope for you, and even His spankings are done in love, and are a proof of His Love! He scolds and applies the rod, but He always adds Love's healing balm afterwards to soothe, encourage, comfort and give you hope of recovery and of redeeming yourself! His encouragement after His correction is like the sun after a storm!
So don't give up the fight, especially when the Enemy's doing his best to discourage you and depress you! God will forgive you for your past errors and He can still mightily use you. Simply acknowledge and confess your sin, accept God's forgiveness, and get on with living for His honour and His glory!--Amen?