Maxwell Maltz said this quote

Happiness is a mental habit, a mental attitude, and if it is not learned and practiced in the present it is never experienced. It cannot be made contingent upon solving some external problem. When one problem is solved, another appears to take its place. Life is a series of problems. If you are to be happy at all, you must be happy - period! Not happy because of.