Negative thinking is okay!
The only thing which makes it not okay is the moment you decide you don't want it.
What matters the most is your freedom of thought. Your right for thinking and feeling whatever you want is your right. In fact it is one of your most basic human rights.
Anyone who comes around and gives you "should's" and "shouldn'ts" is simply violating your mind space by telling you what you should think or not think.
We are stepping in a territory which goes far beyond duality. Positive thinking and negative thinking is not about right or wrong. It is about what you want and what you don't want. In other words, you decide!
If you feel your mind state "hurts" you, that you had enough and want to shift your mind set, then positive thinking could provide you with very useful ideas.
On the other hand, you might like your pessimism and even "enjoy" it. You enjoy the effect it has on others. You simply like this "mind territory" and deep inside you feel like you "own" your pessimism.
Good news! I not only respect it, I encourage you to keep on doing what you want. You are free and it is your right to decide what you want to have in your mind.
What if others don't like it? Perfectly fine, respect their choice and let them decide for themselves.
Some people enjoy sunshine, some others enjoy rain. I didn't often see travel agents advertising a "rainy" destination. I think it is a sign. If people can choose, they tend to go for fun, pleasure and happiness.
Is pessimism a form of defense mechanism? It can. I think defending your pessimism is a way of protecting your mind space. It is defending a set of values which you identify yourself with. After all, they might have been your mind set for years and rejecting it feels like you are rejecting part of yourself.
On top of that, love, happiness, success are values that people are craving for. When you show your happiness, you show some gold others might want to covet. Hiding in the dark territories of the mind makes usually sure you won't be challenged or attacked. People leave you alone because they don't recognize anything they want.
The quest for success, love and happiness feels sometimes a bit like a competitive race. When you take the pessimism road, you send a clear signal to everyone: "I am not in the race, so leave me alone". This is a way of making sure that no one challenges you
It is as well a way of getting negative attention. Negative attention is better than no attention at all. People have a natural tendency to want to help. If they see what they believe is suffering, they feel natural compassion and usually want to do something about it.
If you feel that 80% of the attention you get is related with your pessimism, what happens then when you change your mind set? You enter into a new territory where all rules have changed.
The truth is that mastering the dark side of your mind is a path in itself. There is sometimes a natural fascination for destruction and suffering. When two lovers are kissing on the side walk, people tend to pretend they don't see it.
Now create a car crash and you will have crowds rushing in to see what happened. Check the news.
It seems that humankind as a whole is evolving to more refined territories of the mind. Violence is less accepted now than it was 2000 years ago.
Yes, I believe that pessimism can be seen as a defense mechanism in the same way as any other thought set. A mind pattern is always a combination of energies which protects your mind. Your inner space is supported by thoughts and emotions. They are this invisible architecture which preserves your inner being.
Take away these thoughts and emotions and you have an empty space. An empty space is vulnerable.
You might hold to pessimism simply because this is the mind set you know, these are the energies you have been used to work with. Take this mind set away and yes, you would be vulnerable.
Holding to your pessimism shows something: that you are the one in control of what happens in your mind. You don't let anyone shift your mind set because you see it as an external intrusion. This is why I deeply respect your attitude. You are simply using one of your most natural instincts: preservation and protection of your inner territory.
I see pessimism as a cave. It might be humid and far away from the rays of the sun but it is still some form of protection around you. Stepping out of that cave and being confronted with direct sunlight might simply be too much. You are simply not used to it and might not know how to relate to it.
There can be a moment you wake up to something else and decide to move to another mind set... You could call it optimism, why not. What matters here is not so much the fact that you move to optimism, it is the fact that it is your decision. It is your desire and your call, not someone else's.
You are the master of your life.