I don't know why people find these words worth repeating, or why they might take comfort from them. To me, they are words that don't seem to apply to the person saying them, they're meant for the listener, to tell the listener that he is doing something wrong, looking at something wrong, feeling something wrong, and he should quit being unhappy. Just flip a switch and @!+&*@ing smile.
Like so many political solutions that are offered up, there is little attention paid to details, or how a thing could - or couldn't - actually work. Just be happy by fiat, and if it doesn't work, then there is something wrong with YOU, not my prescription.
In my opinion (which is what you're here for, right?), the only actual meaning that could be squeezed out of these words is that for most people, in order to be happy, they have to be making progress toward a meaningful goal; one doesn't have to wait for goal achievement in order to take pleasure from it. But there's another side to that concept. A dark side, if you will. If you can feel the joy of goal achievement in anticipation of it, prior to completion, then circumstances which move you away from your goal can be as devastating as final failure.
So these words, to me, when used as some sort of mood booster, are meaningless drivel, usually uttered by someone that in the future can be safely ignored - so not altogether different from me.