It's a fact of life (ha! See what I did there?) that not everything you try will turn out.
What I'm finally learning in the garden this year is that I've been seeing my food growing attempts as one big win or lose, but really, it's a lot of different small attempts that may succeed or fail independently.
I was feeling down cast at some gardening fails: the onions rotted from the inside out before I even pulled them, I have not been able to get a single bean plant to live, despite trying three varieties, those darn rabbits are causing all sorts of trouble, I was late transplanting the tomatoes a good 90% of the seedlings died afterward. I was seeing that all add up to one big statement, "The Garden is a Failure This Year."
In reality, I also have cucumbers growing like kudzu, and the first watermelons I have yet to be able to grow. Hot peppers, bell peppers, egg plants and surviving tomatoes are thriving, and the carrots and potatoes were both moderate successes. We ate more peas this spring than any other so far, and I've protected lots of sunflower seedlings into sunflower toddlers so far, and all is going well with them.
So when the garden never seems to be living up to your dreams... ;)