Early in the novel Willy begins to experience delusions, speaking with a past version of Biff (Biff as a child). This is only the first of several delusions Willy suffers in the first act of the play.
Here Willy tells Biff and Happy how to wax the car and tells them about some gifts he will be bringing them back from his next sales trip. The idea of Willy as a success - especially a success in the eyes of his sons - is strongly present in this flashback/delusion.
Later in the first act, Willy is speaking with Charley when Ben appears to Willy in another delusion. Willy cannot keep his mind on his real conversation with Charley and drifts in between a hallucination of Ben and the real Charley.
Each of these moments demonstrate the weakness of Willy's connection to the "real world" and his tendency to hallucinate and recall more favorable times. These better times stand in contrast to Willy's current worries about money, work, and relationships.
Willy's attitude during these delusional episodes often ranges back and forth between joy and lamentation, as we see when Willy tells Charley that his life could have been different if he had listened to Ben. He lost his chance at success, saying:
"There's just one opportunity I had with that man..."
Though Willy has raised two sons and nearly paid off his house, he still considers himself a failure and the delusional episodes help to clarify why this is the case.
He truly believes that he can achieve greatness, and cannot understand why he has not realized what he feels is his true destiny. (eNotes)