Learning from the bad brings you wisdom and experience. Pushing through and being positive after the bad helps you grow and be generally happier in life.
I used to always get upset or mad when I constantly had things go wrong, but eventually my mindset changed and I am now a lot happier, a lot better off despite not having all what I hope to get in life.