If you do not have expectations about something you will never be depressed when it does not happen. Just look at what happened in the election the expectations of the Hillary people and when she lost they went into depression, anger, and mental break down.
There's some truth to that although depression is a lot more than just being unhappy Its probably a build up, I do my best to avoid depression and it helps being generally optimistic