There are several senses of the word ‘guilt’. It can refer to having acted contrary to a law or regulation. Another sense is an emotional or mental state wherein one feels they have acted contrary to a law or regulation or rule.
In the first, establishing guilt can be a simple and straightforward matter. The posted speed limit was 100 km/hour, I was traveling at 120 km/hour, I received a ticket. I was guilty of speeding. I can in this instance say that I was guilty of speeding, and that admission may have nothing to do with my inner state.
In the second, feeling guilty can be completely separate from the first sense. It can mean that a person just feels bad for being in violation of a law, regulation, or rule. Beside the question as to whether they did or didn’t act in violation, they make it mean something about themselves that they did what they did.
It is not only in the area of traffic or criminal laws that feelings of guilt may arise, but also in the realm of social functioning. People judge their performance as parents, sons, daughters, husbands, wives and friends. They decide that they have fallen short in some respect. They may feel they have broken one or more rules.
Two things about that: They may be the only ones that operate by or agree on such rules, and, they undertake to feel bad about themselves in some way because they have crossed a line.
In the first case they may hope that by imposing or accepting the structure of rules that they will be better people. A case can be made for that. However, it may be healthy to reflect on the rules and the following of rules, and determine what net good is produced. Are the rules overly rigid? Are they devoid of compassion? Do they support individuals in being the best that they can be? We can wind up slaves to our suppositions.
Things can also go awry when we start feeling bad about ourselves because we have fallen short of our goals as upright citizens. We become our own judge and jury, deciding there is something bad and wrong about us and our navigation of life.
This kind of guilt gets in the way of our enjoyment of life, and our experience of ourselves as valuable and lovable members of society. It does not make us better, it does not lead to a better functioning world. It leads to what I call recreational suffering.That is, it is feeling bad for the sake of feeling bad.

How can we erase guilt? 

We can evaluate our standards. Look at the positive results of obeying these rules, and take note of unintended costs. Are these rules too strict? Do they cause upset? Do they lead to feeling like an underachiever, of always coming up short?
What do you make it mean about you that you went against your rules? What is it costing you to make yourself wrong, or to feel bad about yourself?
If you feel like a bad parent, you may also feel like a bad person. A part of you gets used up on feeling bad — a part of you that gets taken away from your children. Take guilt out of the equation. Take on a new context. If you’re not the parent you want to be, create action steps to start showing up as the person you want to be.
Drop the self judgment, accept yourself now as you are and as you are not, and look at the future you want to create. It is your choice to erase your guilt, and open up your heart with self acceptance.