How can one have bitachon in HaShem if a person will think to himself “I have done such and such aveirah or I have so many chatoim, how can I be bote’ach in HaShem that he will bring a yeshua”?
The Chazon Ish writes that trust in Hashem implies trusting that all that Hashem does to us is for our eventual good, and not necessarily that Hashem will bring us healing/wealth/goodness in the sense that we desire it.
According to this definition, one can trust Hashem even in the face of our sins.
However, see the Ramban, in his Emunah U-Bitachon, who explains that sins, indeed, are to some degree an obstruction to trust in Hashem, as we find concerning Yaakov Avinu who was concerned lest sinfulness cause his demise.
This topic is deep, and deserves extensive treatment, which I cannot offer in the limited framework of the Q & A service.
Please G-d, we will dedicate an article to the matter sometime in the future.