I don't think the problem is not tracking good deeds. The problem is that most people tend to underestimate their evil deeds and overestimate good ones. Measure evil in what you take from someone. Measure good in what you sacrifice to help others. Thus, stealing a few coins from a rich person is "very little" evil (and most thieves get away with it without turning evil), easily compensated by using a similarly small portion of own resources to help others. Robbing someone of most of their belongings would require giving away nearly all your wealth (including magic items, of course) to balance. Killing an innocent person won't be balanced by anything short of sacrificing (not only "risking") your own life to save someone else.
On the other hand, it's important to remember that acknowledging ones misdeeds and repenting is of key importance in becoming a better person. It is possible to become evil in little steps, never seeing that this time you go too far. Getting back requires turning back from the evil completely. One, not very big, good deed may save a person determined to change; no amount of helping others would better someone who routinely accepts evil.
Another thing is that, in my opinion, the situation the OP described was misjudged by the DM. The character should move rather from lawful to neutral than from good to neutral. Killing bad guys is something good characters in D&D do all the time, and it wasn't done with unnecessary violence and pain, if I understand correctly. Breaking own word, on the other hand, is definitely not something lawful characters do, no matter who they speak with. Law is about dealing in absolutes.
On the other hand, it's important to remember that acknowledging ones misdeeds and repenting is of key importance in becoming a better person. It is possible to become evil in little steps, never seeing that this time you go too far. Getting back requires turning back from the evil completely. One, not very big, good deed may save a person determined to change; no amount of helping others would better someone who routinely accepts evil.
Another thing is that, in my opinion, the situation the OP described was misjudged by the DM. The character should move rather from lawful to neutral than from good to neutral. Killing bad guys is something good characters in D&D do all the time, and it wasn't done with unnecessary violence and pain, if I understand correctly. Breaking own word, on the other hand, is definitely not something lawful characters do, no matter who they speak with. Law is about dealing in absolutes.