These are the irrational thoughts that cause you to feel abandoned and rejected permanently. His conduct, treating others badly to be left alone "… my marsh is mine, mine and anyone else, and less than a useless, pathetic and charlatan ass …" – is also result of these thoughts, it really does not feel this to Burro. You can only overcome this suffering if he can consciously substitute more reasonable. His mental processes have supremacy over their emotions, and tries to hide them through isolation and self-centered. Princess Fiona, who has been bewitched and change of appearance (of day is a princess and an ogre by night) has some thoughts similar to those of Shrek in the sense that if they find their appearance at night will be undesirable and rejected by everyone.
To think that can be discovered when an ogre makes him suffer greatly. Based on the list of cognitive errors made by Beck (adapted by Feixas and Miro, 1993), we can identify conclusions, based on their perception that ugly people are unacceptable to apply itself without justification and assuming they can others think. When given spell the end of the wedding and realizes that, despite not being a princess but a pretty ugly ogre, Shrek loves and accepts it fully, begin to perceive the true facts and unbiased, ie that the fact of being ugly does not mean it can not be loved. Clearly perceived that his thoughts were irrational and there is a cognitive restructuring making her happy.