Someone I know recently posted a question about the correlation between optimism and hope, which is a subject that I have spent a great deal of time thinking about. Between my years in the military and in corporate America, I have endured both good times and bad times, periods of prosperity and adversity, and seasons of rejoicing and mourning. All of these experiences have given me pause to reflect on what I cling to by way of personal philosophy. I posted a fairly lengthy response to the original question, which I would like to paraphrase here.
I firmly believe that there are differences between optimism and hope, although they are intertwined. For example, I believe that hope is often the source of optimism. At the risk of too much information (TMI), I realize that much of the following discussion will be semantics, but to expand on the original question a little bit, here is my take on several related concepts: optimism, pessimism, hope, faith, joy, depression, happiness, and unhappiness.
For me, optimism is the "glass is half full" approach to an immediate situation, whereas hope is the over-arching belief that everything in general will work out for the best; both in your immediate situation and for the future. Sometimes your immediate situation is terrible, and hope is what enables you to look forward with anticipation that things will improve. As I said earlier, I believe therefore that hope often leads to an optimistic viewpoint. In a like manner, optimism may produce happiness, but there have been plenty of times where I have been unhappy and yet still had an optimistic viewpoint; and this was usually caused by having hope.
On a related note, pessimism is often found when all hope is lost, but that is not always the case. I have known pessimists who have a miserable outlook in a given circumstance, and yet they are able to have hope for something better eventually. In a like manner, I have seen some people who are happy, yet still have a pessimistic viewpoint. (e.g. "Life is pretty good in general, but my current situation sucks.") I think a loss of hope can lead to both unhappiness and pessimism.
In my interpretation, faith and joy are somewhat interchangeable and both are related to hope; they are based on a worldview that there is a greater purpose for everything, or that God is in control, etc. So faith and joy are the underlying certainties that produce hope, which can lead to optimism. Conversely, a lack of faith or joy can cause you to lose hope, which may lead to pessimism.
I am generally a pretty optimistic guy; and at times my sense of optimism has been much to the chagrin of those around me when we are collectively suffering through a miserable situation. I possess a strong faith, and usually have both hope and joy to spare, which leads to both a sense of optimism and happiness. However, as I mentioned before, I have occasionally had what might seem to be mutually exclusive attitudes: I have been unhappy yet optimistic, or I have been pessimistic yet happy, etc. Once again, having a strong foundation of faith, hope, and joy are what enables me to keep a greater perspective during some pretty heinous circumstances.
All of this leads to a discussion of depression, which is not the same thing as unhappiness. However, there are scores of people - especially optimists - who believe that depression and unhappiness are the same thing, so they say encouraging things to people who are depressed like, "Why so glum? Buck up! Tomorrow's another day! Greet the day with a smile!" etc., etc., etc., blah, blah, blah. Those statements are pouring salt on a wound. That advice may work for someone who is unhappy, but depression is very different.
On the one hand, depression can be caused by clinical conditions. For example, I am a workaholic with really, really bad work/life boundaries. (Working from home for years has made that worse, for understandable reasons.) I have on more than one occasion overworked myself right into burnout, which can cause chemical imbalances. As a doctor explained to me after a recent struggle, I had burned the candle at both ends for so long that I was running day to day on pure adrenaline, which changes the brain chemistry in some weird ways, and eventually that can lead to clinical depression. This situation may need to be fixed by prescription medicine and a forced schedule to restore body and the brain to their correct chemical balances. (I've had to go through that on more than one occasion. Which reminds me - I've averaged about two hours of sleep per day for the past week. You'd think that I'd learned my lesson by now, but apparently I'm a slow learner.)
On the other hand, another type of depression hearkens back to several of the subjects I was discussing earlier: I have been depressed when I felt abandoned by God. In those situations, I may have been experiencing any mixture of happiness or unhappiness or optimism or pessimism at any given moment, but my overarching feeling was an emotionless state of numbness. I had no faith, no hope, no joy - therefore I had no foundation upon which to base my outlook of the world. Once again, no amount of "positivity" was going to fix that situation; I simply drifted from day to day in that continued state of numbness until my faith was restored, after which I was able to slowly rebuild the rest of my life.
In summary, all of this was a far greater answer than the original question had sought. And to be clear, everything that I have said here is just my opinion, which is based on my personal observations and experiences.