Blessed are You, Lord our God, King of the universe, Creator of numerous living things with their deficiencies, for all that You have created to sustain every living being. Blessed is He, the life of the universe.
Why is it that we bless God for creating us with deficiencies? The Chofetz Chaim provides an instructive answer. He explains that God intentionally created us with certain strengths - as well as certain weaknesses - because we are supposed to be interdependent. Otherwise, we'd be automatons and have no need for other people. In such a scenario, life would be virtually meaningless. Therefore, we bless God that we aren't perfect. Furthermore, by helping other people with the talents God gave us, and by allowing others to help us with the talents God gave them, we sustain the world.
Although the Torah speaks of the greatness of its most famous figures, it also goes out of its way to note their flaws. Why? Our Sages explain that it is to teach us that we too can be good without being perfect. From Rachel's jealousy of her sister who had children to Moses' moment of anger at striking the rock, instances of flaws in character are often mentioned so that we can learn how to control our own jealousy and anger, for example. Obviously, the flaws of our biblical heroes were minor compared to our negative character traits, but such things are mentioned for our benefit.
The Torah wants us to be able to take away practical advice on how we can improve ourselves. If the Torah and its commentaries were only records of how perfect our ancestors were, we wouldn't be able to learn anything tangible from it. As a side note, this lends credence to the authenticity of the Torah. It often speaks of its most beloved people with all their weaknesses. You would think that it would go out of its way to overlook such flaws. But if the Torah did so, it would not serve as an instruction manual for life, and its lessons would be totally unrelateable.
This brings to mind a good sports analogy. While there are many fans who like to see their teams' most talented players return as coaches, this can often be counterproductive. Some of the best coaches weren't great stars during their playing days, and this is precisely why they can be so helpful to struggling players. If they had too much natural talent, they couldn't relate to a player who was struggling in a certain aspect of their game; they would simply expect too much from them. Therefore, coaches who were average players are usually better for younger athletes who need guidance, because they had to overcome similar obstacles.
There's a Talmudic dictum which states, "if you try to grasp everything, you will grasp nothing" (Rosh Hashanah 4b). In other words, if you aim for perfection, you will be disappointed. None of us can be perfect, but all of us can be good. Luckily, goodness is what God desires. So, despite all your imperfections, be the best you that you can possibly be. Don't get overwhelmed when you inevitably do something wrong, because you can overcome the error and still achieve greatness. Who knows - maybe one day you'll be able to help someone else correct a flaw in their character because you had to deal with the same problem.