I agree so far as to say that a person can only really say that they try to be a good person, that they believe themselves to be good people, but to state it as a solid fact, I agree one cannot do that. Then again I don't thing that popular opinion of someone as being good necessarily makes them a good person either. Popular opinion tends to be as changeable as the wind 
For me I believe a person can be a good person in spite of those bad days. Everyone can fall short of their potential for goodness for a number of reasons. I guess it partly comes down to what you do when you realize you you could have done better, or caused harm? Do you try to apologize, to 'fix' what you did that could have been harmful? If so then I would still call you a good person 