How is Willy affected by his good and bad memories?
In some ways, Willie doesn't have a present; he has present experiences, but it's so unpleasant that he lives almost entirely in the past. I believe that this is one of Miller's themes: the past does not exist in any real way, but its influence on the present is all pervasive, even if an individual's recollection is of a past that never existed. Willie has both types of memories. He remembers the days when he and Linda and the boys had an almost idyllic family life, when he came home and the boys were thrilled to see him, when they simonized (what an old word :)) the car each weekend, when Willie went out and earned a "living" for them. Mixed in with these memories are recollections of salaries he never earned, of meetings with mayors that may or may not have happened, of promises that may or may not have been made. And, of course, there is the horrible recollection of Boston and the buyer and Biff, memories that hang over his realtionship with Biff from that day on. And there are the memories of Ben, memories of what might have "Been." Who knows how true these are, but they clearly haunt Willie --- the dreams of what might have been.
All this reminds me of Frost's sigh at the end of "The Road Less Travelled." We make decisions (salesman/explorer), and then see what happens. For Willie, it wasn't all that great.
Willy does not have a "grip" on reality, so his memories may be exaggerated and/or fabricated. It is hard for the reader to tell the difference between what is real and what is not in Willy's world. Willy's good memories make him happy, but unfortunately, they also cloud his reality. He is trying to live in the past and that is not his reality! He dwells on the "what ifs" and the "could have beens." His bad memories only serve to drive him further into a state of depression and perception of his own failures. He cannot face any more failure and decides to commit suicide so his family can have the insurance money:
Ultimately, because he cannot live with the realization that he has failed to live up to his unrealistic expectations, and because he believes he will finally be able, with his death, to leave his family with a sizable amount of cash, namely a $20,000 life insurance payoff, Willy commits suicide. (eNotes)