The Noble Prophet said...
The Noble Prophet said: 'if you are pessimistic then do not let that keep you from continuing, and if you are suspicious about someone, do not judge on that basis, and if you are envious of someone, do not persecute him “ Jealousy has been called the prison of the soul, and such an impediment to one's spiritual development that there is no place for it in akhlaq. We also can find examples of thoughts being the subject of the both sets of rules governing the life of Muslims.
One of these, considered one of the greatest sins which mostly manifests itself in one's thoughts, is despair of God's help. There are many Hadiths regarding this subject and it is so grievous a sin that it is considered a form of or disbelief in God.
There are several reasons for this; and just from a psychological point of view, such a person, so lost in sin and so despondent of ever being forgiven by the Lord, has no practical incentive either to save himself, or to save the society from his future misdeeds. This feeling of despair, we are taught in Islam, is worse than the sins themselves. Even in mandatory, practical laws, fiqh, Muslims are explicitly forbidden from ever losing hope in God's forgiveness.
We are told that such despondent thoughts are one of the most effective weapons of Satan, who will rejoice at the spectre of a lost soul, despondent of his Lord's mercy and forgiveness. Such people are told to truly and sincerely repent, amend for past deeds to the extent possible, and have faith that the Almighty God will forgive them.
Another great sin, which also has to do mostly with one's thought, is to think oneself free of the possibility that God will not exact punishment for one's misdeeds. To consider oneself the master schemer somehow able to get away with sin. In the Glorious Qur'an we find: “They planned and Allah planned, and He is the best of Planners. “ (3:54) So we are told not to think ourselves beyond God's justice, and not to scheme and deceive, for it is all in vain.
One of the words used in this verse is (makr) which when used for man, means deception; but when used in connection with Almighty God connotes planning in an innocent, yet capable manner. An example of this is found in the account of the Quart’s attempt on the Noble Prophet's life. They thought their plan carefully through, and in order to spread the blame and avoid the consequences, sent one man from each tribe to carry out the assassination.