In Parshas Vayikra we are introduced to the laws of the korbanos - the offerings. The Ramban (Vayikra 1:9) teaches, "since man's deeds are accomplished through thought, speech, and action, therefore Hashem commanded that when mans sins and brings an offering, he should lay his hands upon it in contrast to the evil deed he committed, he should confess his sin verbally in contrast to his evil speech, and should burn the innards and the kidneys of the offering in fire because they are the instruments of thought and desire in the human being."
The extent to which korbanos are brought to rectify negative and improper thoughts may be seen from the following two instances. At the end of Parshas Vayikra the Torah introduces us to the korban oleh v'yoraid - the variable offering whose cost varies according to what the sinner can afford. It is called an "offering that goes up and down". The Torah lists three sins for which this offering is brought: denying testimony, contaminating holy things, and false or unfulfilled oaths. For violating any of the above, a wealthy individual brings a sheep or a goat for a korban chatos, a sin offering. If, however, one cannot afford the animal offering, he may bring in its stead two birds (either two turtledoves or two young doves) one for a chatos and the other as an olah (a burnt elevation offering).
The Evan Ezra (Vayikra 5:7) cites Rav Yitschok who addresses himself as to why two birds are brought by the poor man in lieu of the one animal brought by the wealthy sinner. He gives a most fascinating answer, namely: lest the poor man sinned with his improper thought! When the poor man confessed his sin of not testifying on someone's behalf, and wishes to accomplish a complete atonement but cannot afford to bring what he considers a good and proper atonement of either a sheep or goat, often when he brings his meager offering he will harbor resentment and question G-d's judgement as to why he is a poor man. Even if he justifies his criticism of Hashem by wanting to serve Hashem in a more generous and lavish fashion, he has shown ignorance of the last Mishna in Menachos that teaches that it is not the cost of the offering that affects atonement, rather the sincerity of the one that brings the offering. Moreover, he is guilty of not appreciating Hashem's acts of kindness to him and for being an ingrate. To atone for these negative thoughts and criticisms he brings the second bird as an Olah, which atones for sins of improper thought.
A further example of this is found in the commentary of the Ramban (Vayikra 14:18) who notes that as part of the purification process for the metzorah - the one stricken with leprosy - many offerings (an asham - guilt offering, a chatos, an olah, and a mincha - meal offering) are brought, and all are expressions of atonement. Why so many? The Ramban suggests that one offering is to atone for the sin he committed before he was affected by the plague, and the additional sin offering for the sin he committed during the time of the plague. Citing from Iyov (1:22), "perhaps in his anguish he complained to Hashem". The affliction of tzara'as manifests itself physically upon its victim, and in addition it causes him to be removed and ostracized from the community. The shame and psychological anguish of the metzora must have been unbearable, Yet even in this state, lest he thought that Hashem was mistreating him, for these negative thoughts he must bring a sin offering.
The above two examples demonstrate how careful one must be with their thoughts, In reality it requires a strong belief in hashgacha pratis - Hashem's direct and personal involvement in the life of each individual, coupled with the belief that "kol david rachmana l'tav avid" (Berachos 60b) - all that Hashem does is for the best.
The Purim holiday that we are about to celebrate, if properly understood, reinforces this principle. The Talmud (Megillah 7b) teaches that "one is obligated to become intoxicated with wine on Purim until one does not know the difference between cursed is Haman and blessed is Mordechai." The Avudraham explains that since they key events of the miracle of Purim - Vashti's downfall, Esther's coronation, and Haman's execution, all occurred during a feast of wine, we commemorate the miracle by drinking on Purim. The L'vush in his commentary on the Shulchan Aruch (O.C. 695) teaches that Purim differs from Chanukah. The latter was primarily an attack against the spirit and Torah of the Jew, therefore we celebrate with lighting the menorah and hallel to Hashem, and there is no obligation to eat a festive meal or seudas mitzvah. Purim, on the other hand, was a physical threat to annihilate the Jewish people, and thus we gladden the body by eating and drinking, and one of the four mitzvos of the day of Purim is to eat a festive meal.
The Kedusha Leivi offers a novel interpretation of this famous passage of the Talmud that one is to drink until one cannot differentiate between cursed is Haman and blessed is Mordechai. Everything is for the good. Thus, even those occurrences that appear on the surface to be bad are in reality good. A case in point is Purim. Haman wanted to do great harm to the Jewish people. This certainly was bad, but note that his evil design was not only thwarted by Hashem but actually served the Jewish people well. The Talmud (Megillah 14a) states that Haman's decree did more to unify the Jewish people and bring them closer to their father in heaven than did the preaching and admonishing of all the prophets that preceded him. Thus, Purim shows that there is a more profound way of looking at events. Ordinarily, man has limited vision and understanding of events. However, when man enjoys and partakes of several glasses of wine, he loses his former limited intellectual perspective and can realize that there really is no difference between cursed is Haman and blessed is Mordechai, as ultimately, with G-d controlling all, it is all good.