The theme of self-deception can be seen all throughout Twelfth Night. Two examples can be seen with respect to both Olivia and Duke Orsino.
Olivia deceives herself into believing that her excessive, prolonged grief over her brother is the acceptable and right thing to do. We learn in the very first scene from Valentine, one of Duke Orsino's servants, that Olivia plans to mourn her brother's death for seven year, to never show her face in public unless she is wearing a veil, and to cry every single day, as we see in some of Valentine's lines, "The element itself, till seven years' heat, / Shall not behold her face at ample view" (I.i.27-28). We also learn later from the sea captain who rescued Viola that Olivia is rejecting the presence of any company in her home except for her own servants and family members. Even widows only mourned for one to two years, and during that mourning period, they are certainly permitted to abstain from society. However, Olivia is a sister and not a widow; therefore, not only would a seven-year mourning period be excessive for a widow, it is certainly excessive for a sister. Feste points out her self-deceptive, foolish behavior when we first meet him in Act 1, Scene 5. When Olivia demands that he be taken away because she is angry with him for having been gone from the house so long, Feste turns the tables and asserts that she is the true fool. He asserts it by saying that it is foolish for her to mourn so over a brother whose soul is in heaven rather than in hell.
Duke Orsino is also guilty of self-deception with respect to what he thinks is his love for Olivia. The sad reality is that he is not really in love with her so much as he is in love with the idea of loving her. He doesn't really know Olivia; he has never spoken with her; he has only fallen in love with her beauty. He also believes that her grief over her brother shows just how much she would love a man should she fall in love, which makes him continue to pine for her. However, his love for her is really more of an obsession, showing us that he is deceiving himself into believing that he is in love with her.