Hello. You did not provide the text which may make the textual evidence inaccurate.
Loman is a man who suffers from his own expectations. That's because the play portrays him as a middle-aged man, a clerk who is undervalued in his job and who can't really be good at anything he does. Loman recognizes his failure and to alleviate that suffering and the sadness that failure brings, he uses his imagination, to create an illusory reality where he is everything he wanted to be. This illusion really comforts him and helps him to continue living, but when reality hits him, he recognizes that he is a failure.