Karma and one's own belief about the event Suppose I yell at a person and I hold a belief like: "I made a mistake and I try my best not to repeat that fault again" vs "I'm such a bad person for doing that bad deed. I should feel ashamed of myself" then the kamma is completely based on my sincere beliefs I hold about the situation and the less anger, greed and delusion they have the better the karmic results, right?
In my tradition we recognize three ways to do repentance.

On the basic level, we should feel ashamed and guilty, tell someone about our misdeed, then decide not to repeat same mistake. Then stop beating ourselves about it, since that only makes things worse after certain point. 

On the medium level, we should understand that our mistake was because of a particular delusion or reification that manifested as some sort of attachment, which then produced the behavior. We should make an effort to really see our preconception or overgeneralization or attachment that gave rise to the misdeed, and make an effort to let go of it. 

On the highest level, repentance consists in simply recovering the stable and pure state of mind and staying in that.