When something we invest in fails, we tend to internalize the failure, making it our fault and then spend time (sometimes years) punishing ourselves for it. Often we go against our true nature, our deep seated values, to try to make those relationships work. That doubles the guilt and sometimes even shame that we feel for the betrayal of ourselves as well as taking responsibility for the failures.
First, it is necessary to understand these feelings...look them right in the eye...then forgive ourselves for what we saw as failure. Life presents us with lessons, there is no success or failure as such. There is only learning and growing. Each step we make brings us closer to the goal.
There has been a great deal written about learning to forgive and to love our selves. We can not truly love another until we can love ourselves unconditionally. The negative feelings are coming from the ego. I believe that psychology refers to it as the inner child. We have to nurture that ego, that child, in order to bring it into balance with the whole. This is the emotional pillar that needs to be brought back into balance. The ego must learn that it is not the owner of the temple, therefore it is also not responsible for everything that goes wrong.
I'm not sure if we are born with this tendency to blame ourselves for everything or if it is something our parents and society teaches us when we are very young. I have seen this in operation over and over again. The child believes he caused the parents to break up and must bring them back together to rid itself of the blame. My older daughter passed on from encephalitis when she was five and my younger daughter was just three. It was not until she was grown that I found out she had always thought that she had caused her sister's demise. They had been playing in their bedroom a week or so before, and my older daughter fell and cut her lip against the corner of the dresser. That is what my younger daughter though had been the cause. That kind of self blame is so insidious because we grow up with it and are generally unaware that we are even doing it. By the time we are adults, we search for blame for everything that goes wrong. Sometimes we blame others and sometimes we blame ourselves...or both. As hard as it is, I believe it is easier to forgive others than it is to forgive ones self.
Self blame feeds depression and vice versa...a real catch 22. We need to break the cycle, to accept ourselves and own our actions and to see ourselves as worthy of love. A tall order, but it can be done. Sometimes it helps to sit down with a notebook and pen and try to identify why you are feeling bad about yourself, then look behind those reasons to see the root of the problem. Identifying the problem is at least 50% of the cure. With some idea of the dynamic it is possible to tailor a meditation to work with it.