There is a chapter in ארחות צדיקים titled שכחה, or forgetfulness. On the one hand, we are commanded in the Torah that it is forbidden to forget what we saw at Mount Sinai. And it is forbidden to forget the Torah that we once studied. But, on the other hand, we are also supposed to be careful about selective memory.
It can be very dangerous for one to only remember his good deeds and conveniently forget his transgressions. This will cause the person to overrate himself and think of himself as a Tzaddik.
It is much more beneficial for a person to forget about his Mitzvot and downplay them. He should focus on remembering where he has done wrong, and work at fixing his weaknesses.
It is interesting to me how our Rabbis understood human nature so well and how they saw it as their job to always find ways to motivate people to achieve the maximum at self improvement.