how important is self forgiveness in karma ? I am trying to understand karma, I have and continue to read about intention and letting go. I am struggling with something. Could you help me ? 

A) If I acted (unwisely, unkindly, causing suffering), not knowing that what I was doing was wrong, and never realizing it to be wrong, I believe this is neutral. 

B) If I acted (unwisely, unkindly, causing suffering), while knowing that what I was doing was wrong, and continued to understand it to be wrong, I believe this is bad.  

C) If I acted (unwisely, unkindly, causing suffering), while knowing that what I was doing was wrong, and then saw that the act resulted in something good, I believe this is bad.  

D) If I acted (unwisely, unkindly, causing suffering), not knowing that what I was doing was wrong, and later realized it to be wrong, I believe this is neutral. If (now that I understand) I harbor guilt and attach to this guilt I am doing bad. Here I am asked to forgive myself and move on. If I continue to wallow in the guilt then I am doing more bad. 

(assuming I am correct on A-C) the problem I have with D is likely based in the faith of my birth (catholic), where I was made to believe that guilt is really like a payment and the worst the act the longer you need to pay for it (like a monetary value) by continuing to hurt yourself with guilty feelings. 

in Buddhism, if attaching to guilt is bad, then how long do you need to feel it ? do you just move on as soon as you realize it was wrong ? If the suffering impacted someone else do they have a "say" in how long you cause yourself suffering (if not literally, then in some kind of moral equivalence that you calculate yourself ?) 

thank you for sharing your insight.
In my understanding, 

The original action is one source of karma.
The hidden agenda (intention,attitude) behind that act is another source of karma.
Our thoughts reflecting on that after it happened is the third source of karma.
Our decision to explain what happened and why, in one specific way, is the fourth source of karma.

Each of the four components can be wholesome or unwholesome, so there are 16 combinations in total, or 16 gradations - from 100% unwholesome, to 100% wholesome. Also, the combinations vary by the timing of their effects, producing a complex mixture of some immediate and some latent results. 

In context of this question, what we are interested in is the difference between the last two components. 

The thoughts about the event (going over it, analyzing, evaluating oneself) can generate either pride and joy, or shame and guilt. This guilt, by itself, is a dukkha, disease. Maintaining oneself in a maimed and injured condition creates negative karma that keeps the vicious circle going. 

The decision to explain what and why happened, in a specific way, is the most important component for the long term effects of the action. What is "specific way"? Usually, real life situations are not unambiguous. Instead, they usually have an element of ambiguity, a quantum element so to speak. In most situations we can come up with a number of narratives or interpretations, that will present situation and your role in it rather differently.

What often happens when we analyze a troublesome situation, is we can't decide which perspective we should take. So we keep going over it again and again, replaying it in our head, which can bring a lot of guilt and suffering. Instead, if we decide on one perspective, and make a firm decision to stick with it - then we can stop replaying the situation, and clearly describe what happened and exactly why, and based on this choice of explanation our future will change accordingly.

The perspective Buddha suggest we should take, is that of responsibility, but at the same time the one that will make us strong, not sick with guilt. Here's what happened, here are the attachments that were at play, here is the confusion that was at play, here's the lust and aversion that were at play. Here's why I thought it was a good idea to act like that at the time. However, now I clearly see how and why my actions created that harmful effect.

It is an important skill, according to my teacher, to never betray one's past decisions. If we decided to act a certain way, we must have done it out of our best understanding at the moment. Given our understanding at the moment, we could not have acted differently (if we could we would). However, if we act now, we will act out of our new best understanding, which may be different this time.

The only function of "taking the blame" is to admit that situation indeed happened the way it happened, and that our actions played a role in that. We were acting out of our best understanding, but because our perspective was limited, we participated in creating these negative results. With our new understanding we can see that a better action is possible, and we want to try it that way next time.

This is called "master mind" as opposed to "leaking mind". Leaking mind is the mind that betrays its own foundation, it's own past decisions all the time. Leaking mind says "oh I was so stupid yesterday" or "so wrong" etc. Master mind has an element of confidence and stability, it honorably inherits its past actions and choices, while never getting attached or stuck in the past and taking into account new information as it becomes available.