So optimism becomes more relevant to unfavorable situations. When things are bad, positive action is like a natural reflex. It is there anyway. Nobody wishes and hopes to die (at least most of us). All of us react in a ways that attempts to improve bad situations. The effectiveness of such attempts depends on our 'ability' and 'intelligence'. So 'optimism' boils down to performing those improvement related actions with a mental feeling of hope as opposed to a fatalistic/negative approach. It is regarded by many that this subtle mental orientation has invisible control over the effectivesness of our actions and influences outcomes. 'Confidence' shares such similar attributes and at this point is liable to be easily confused with 'optimism'. Separate 'confidence' aspects of this mental feeling and there is little left to celeberate optimism.
I have had, what I perceived as, optimistic feelings and in a perverse way I feel good to know that I can resort to it during bad times. But dissecting mental experiences to isolate optimistic impulses have often frustrated me. It is beyond the boundries of what I perceive as 'logic'. So is optimism a function of someother emotion or a incorrect reading of a some other mental experience? Is it a science that is mutually exclusive from logic, like astrology, that offers a mental comfort during distress that tries to tell us that things will become better?