Willy Loman certainly is a character living in a psychological world that does not reflect reality. What probably began as an illusion, became a delusion over time. When reality could no longer be ignored, Willy took his own life rather than live outside his delusion.
Perhaps the "American Dream" is an illusion. Certainly Miller is not alone in believing the ideal of work leading to success is an impossiblity without either luck or connections. Willy Loman clings to the idea that effort equals prosperity but fails to see that ability also plays a role. Willy refuses to address his shortcomings and he refuses to see the weaknesses in his sons.
In Act 2, Miller summarizes the depths of Willy's deception and how is affected his family:
Biff: And I never got anywhere because you blew me so full of hot air I could never stand taking orders from anybody...
Willy: The door of your life is wide open!
Biff: Pop! I'm dime a dozen, and so are you!
Willy: I am not dime a dozen! I am Willy Loman, an dyou are Biff Loman!
Biff: I am not a leader of men, Willy, and neither are you...Pop, I'm nothing! I'm nothing, Pop. Can't you understand that?...Will you take that phony dream and burn it before something happens?
Biff comes to understand that the prosperity dream is an illusion, and he chooses to not live under it anymore. Happy, Willy's other son, continues to believe in the dream, while Willy finally loses his last connection to reality and before the scene is over crashes his car for the last time.
For Willy Loman, the illusion of the American Dream became a delusion of popularity and success that led to the death of the salesman.
In many respects, Miller does criticize the notion of living with illusion in his play. Wily is consumed with the belief of "making it" through an economic mode of reference. Much of this derives from Miller's characterization of Wily, who is seen throughout the play as one who believes in success through a "quick fix" and one who measures his own success through terms of money. Such a notion derives from Wily's own inability to look honestly at his own life and assess in a true manner his condition. Wily does not engage in a serious method of reflection or analysis, something that reveals a sense of sobriety and honesty about things. This allows Wily to succumb to illusion and a false sense of vision about how success can be measure and what constitutes a successful life.