Whether you believe in the Bible or not, it's a helluva (excuse the expression) piece of writing. Take, for example, the tale of Judas. It's a perfect illustration of the unproductiveness of the emotion of guilt. Judas sells his friend Jesus to the Romans for thirty pieces of silver and immediately starts feeling guilty about what he did. So, what does he do? He can't undo his act, but if he had thought ahead a little bit he might have realized he was going to feel guilty and not done it. OK, let's assume he was determined or carried away or not thinking straight or even divinely fated (in some interpretations) to do the betrayal thang. He could get rid of his guilt by going and talking to Jesus and going, "Uh, I'm sorry and I feel really bad now." Jesus would have forgiven him. Alternatively, he could have gone out, spent the thirty pieces of silver and had a high ol' time and taken his mind off it. (Morally that doesn't look too cool, but from a purely economic perspective it makes some sense.) Or, if he didn't feel like doing that, he could have donated the money to the poor as atonement. He does neither. He sits around feeling lousy, then (in some versions) he goes and yells at the people who paid him (like, it's their fault?), and finally throws the money away and goes and hangs himself. Yeah, real helpful and intelligent there, guy.
As I have told several people, I think there are folks in this world who have such a low opinion of themselves that they almost unconsciously go around screwing things up so they can keep playing this recording of "I am BAD and GUILTY" in their heads. Because they don't know any other way to feel. I think a lot of the games people play with relationships, food and weight, and drinking and other controlled substances fall into this category.
I have gone through my own phases of feeling incredibly bad and guilty for things I've done. However, my logic sense always kicks in at some point, when I'm really castigating myself, and says a couple of things. The first being, "Don't be so hard on yourself, geez, you're just a person." (Johnny's voice from when he was still sane, twenty years ago.) The second being, "You did what you wanted to do. If you hadn't wanted to do that, you would have done something else." (Me talking to Larry twenty years ago. Yes, I have these scripts filed in the metal cabinet in my head library for handy reference.)
As a Catholic, I obviously had tons and tons of guilt bricks laid on me by parents, teachers, other authority figures. Guilt is supposed to be a teaching tool, but like spanking, it can get way out of hand. Guilt easily crosses the line and becomes a manipulative device. I believe that it has a limited usefulness in the legal and moral/religious contexts, with emphasis on the "limited". It is not so useful, and sometimes downright destructive, in the interpersonal context. I have gone out with some very guilty people, and they were not fun to be around. They tended to be very emotionally repressed and seemed to be playing whack-a-mole on themselves constantly for things such as "cheating" on their girlfriend or having a sex drive at all. I wanted to shout, "Look, if you don't love me back or you feel bad about something, why don't you just SAY SO and we can talk about it instead of you sitting there with that constipated look?" In extreme cases they would take out their guilt on me, like I had somehow twisted their arms into committing whatever "sins" they felt badly about. Silliness, because they made choices, they need to take the consequences, like my father always said. I'm not in the business of bearing your burden, nor handing out your absolution.
Yes, many people seem to deal with guilt by looking for someone else to blame their bad act on, or yelling, or beating up on themselves in front of me, or doing some other damned useless smokescreeny thang. How many times have I said something like, "You didn't do X like you said you would," and had someone yell at me because they feel bad about not doing X? Like that really helps, to make me feel bad by yelling at me when we could have had a discussion. Or they start playing the, "I'm just a lousy terrible person, I hate myself, I'm no good at anything" violin, which is similarly useless. I don't want to bother with all that. I don't even have time to listen to it. I just want to figure out what the realistic odds of you doing X in the future are so I can decide whether I realistically want to rely on you to do X, or should we have you do Y instead, or should we just skip the whole thing. The key word being REALISTICALLY. Just like I don't throw my cats off the roof and demand that they fly, I don't demand fantastical behaviors from you.
In summation, guilt is a useless act unless it motivates you to do something proactive. This could include: realizing your human limitations so you don't feel guilty for doing/not doing things that you couldn't help; not getting into situations that make you feel guilty; having a rational discussion. In the Catholic faith, confession is seen as a positive and proactive act motivated by guilty conscience. I have very mixed feelings about that, but it does confirm my point that guilt is supposed to be leading to some positive change.