It can't be done. We all have down moments. This is inevitable. Stop thinking everything should be perfect; it's not and never will be. But perhaps we can accept this fact, come to terms with it, and maybe even find peace in it.
By accepting that we will feel down, likely in the near future, we can make the sucky moments, well, a little less sucky.