Background:
Hashem created you. You are to him like an only son.
If he made you, it's because he needed you to be around.
You are not a mistake.
That being said:
Hashem obviously knew what would "come out" of you (though, as the Rambam says - at least I think that's who said it - : "It is (almost-?-) impossible to understand how free choice and Hashgocha Protis fit together").
Explanation:
You should be happy because you are Hashem's son, and nothing and nobody can take that away from you.
You should have Merirus (bitterness) about your flaws, in a constructive way, when making a Cheshbon Nefesh (not 24/7).
It would definetely be a Stirah, were you meant to have Atzvus (depression - a naynay, always!), or even (the sometimes needed) Merirus (KN"L), at the same time. But you are not.
You should be Tomid Besimcha, and only have specific times dedicated to true Self-evaluations, which may (and hopefully will) bring to constructive bitterness, meaning to want to be better.
Edit:
You may want to look at Tanya, chapters 26-28.
Note: If you are ever in doubt of whether your temporary bitterness (as depression has no right time) is From your Yetzer Tov, or the opposite (R"L), ask yourself:
"what do I want to do because of this bitterness?"
If the answer is "get closer to Hashem", great!
Now leave it alone and do that!
But if the answer is anything negative, such as "give up, I'm bad, I stand no chance anyways, it's too late", then tell that bitterness: "out of my way!"