All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
The origin of pessimism or belief in evil omens is that whenever one of the Arabs wanted to do something during the pre-Islamic era, he would go to a bird's nest and try to make it fly away. If the bird flew to the right, he would take this as a good omen and go ahead with his intention; but if the bird flew to the left, he would take this as a bad omen and refrain from doing what he intended to do.
When Islam came, it prohibited and forbade all such beliefs. It was narrated on the authority of Abd Allaah ibn ‘Amr both, that the Prophet, sallallaahu ‘alayhi wa sallam, mentioned that whoever lets pessimism stop him from doing something, is guilty of Shirk (polytheism), and the expiation for this is to say: "Allaahumma la khayra illaa khayruka wa laa tayra illaa tayruka wa laa ilaaha ghayruka (O Allaah, there is no omen but there is reliance on You, there is no good except Your good and none has the right to be worshipped except You)." [Ahmad in Al-Musnad (Al-Arnaa'oot: Hasan)]
The Prophet, sallallaahu ‘alayhi wa sallam, also mentioned that whoever lets pessimism stop him from doing something, has fallen into Shirk (polytheism). [Al-Bazzaar in his Musnad (Al-Albaani:Saheeh)] In another Hadeeth (narration), the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, explained that pessimism contradicts Islamic creed. [Muslim].
It should be known that pessimism is considered major Shirk (polytheism) if a person believes that the thing that makes him feel pessimistic has an influence by itself. However, if a person believes that everything is in the hands of Allaah The Almighty and occurs only with His permission, he still might find fear in his heart because the thing that causes him to feel pessimistic often brings him evil, then this fear is reprehensible, especially if it is due to a custom of his. This, then, is minor Shirk. In such a case, if he seeks refuge with Allaah The Almighty and goes ahead with his intention, putting his complete trust in Allaah The Almighty, then there is no harm in this feeling in his heart.
It was narrated on the authority of Mu'aawiyah ibn Al-Hakam As-Sulami that the Prophet, sallallaahu ‘alayhi wa sallam, mentioned that pessimism is a feeling in the hearts of those who feel pessimistic, so it should not prevent them from doing what they want to do. [Muslim]
The Sharee‘ah (Islamic law) prohibits pessimism because it implies that a person's belief in the decree of Allaah The Exalted is weak, and that he depends on others other than Allaah The Almighty.
Allaah Knows best.