Guilt is not necessary for goodness, and doesn't usually create goodness either.
Plenty of people cause harm and feel bad yet choose to keep on doing it. Does their feeling bad make them a good person? No, it makes them an average person with a guilt response. That bad feeling that many people initially experience when they realize that they probably have hurt someone is a morally neutral signal. If it has a good function, it is to warn you in the same way that physical pain is meant to warn you so that you can reduce the harm that's happening. If you wallow in the signal until you feel sufficiently punished, and then continue to do the same actions, you are no better than someone who simply ignores the signal until it goes away. Feelings do not have moral value; they are only signals. Your morality is defined by your actions.
A lot of people confuse guilt with empathy. Guilt is not empathy. Empathy is when you feel the pain that someone else is feeling like it was your own. Most people do not practice taking the perspective of others deeply enough and carefully enough to feel empathy except with their emotionally intimate people. Guilt is when you feel like you did something that was bad and you need to do penance or be punished. Feeling intense guilt whenever you hurt someone doesn't make you a good person or even a compassionate one. Guilty people often make literally the worst possible moral choices in order to feel punished, forgiven, or justified, or in order to block out the memory of their mistake. Empathetic people make choices which keep them from causing the same harm again, because it is about the other person and not about oneself. If what you are feeling is empathy, then being punished, being forgiven, doing penance, or feeling justified will NOT make you feel any better.
If you find yourself feeling guilty when you learn about oppressions that benefit you or suffering that you don't experience, I urge you to change your thinking from "if I have caused harm I should feel bad or be punished unless I am somehow justified in causing this harm" to "if I have caused harm I need to do the necessary work of changing my thoughts and actions so that I cause less harm in the future." Then, when you learn about a mistake you made, you don't need to feel guilty. You just need to figure out how to not make that same mistake in the future, and if you have hurt an intimate person (friend, lover, etc) with your mistakes, ask them how you can help them heal if it is possible (which it may not be and if so you must accept this).
Do not respond to feelings of guilt by avoiding the person who you feel guilty about hurting. Unless they have told you to leave them alone, avoiding them is probably compounding the harm you have caused by reducing the intimacy that is accessible to them. In cases where you are feeling guilt related to oppression this is especially true, because the more a person is marginalized, the less access they have to intimacy in general and the more harm your avoidance will cause. But don't dump your guilt on them either: work through it as quickly as you can so that after, you can be a friend to them.
When you were a child, your caretakers were supposed to teach you how to make good moral choices; but if they tried to do this by using punishment, they probably failed because they were relying on a guilt response. In a lot of us who were punished as children, that guilt response was so over-activated that it is entirely useless to us as adults. We feel guilt over morally neutral choices such as how much fat is in the food we eat and how much inconvenience we cause, and must shut down our guilt response to even survive. Sometimes this leads to us hurting others, but it doesn't have to. If we stop considering guilt and blame, and instead build our morality from scratch based on what causes the least harm and make sure we are open to constant development of what 'least harm' means, we can live moral lives and do good without any guilt response at all.
I am not exaggerating when I say I think this is the most important post I have ever made. So many people are swept under by guilt, and that stops people from developing into their best selves. It stops people from changing their behavior because they feel like they have to change their whole identity and divorce from their former self if they admit they did something they now consider morally wrong. Admitting you did wrong should not come with guilt or shame; in fact it should come with a sense of excitement at learning a better way to be human. I want to live in a world where people might regret their actions and wish they behaved differently, but they're not going to judge themselves as a bad person for making a mistake when they didn't know better. I want people to feel free to critique each other because everyone knows that mistakes are to be expected and if someone says "hey, your action was wrong" that doesn't imply anything negative about you as a person. Personally, if I let you know that I think something you did was wrong, that probably* means that I trust that you have the best of intentions.
So if you're reading this I beg of you, consider your perception of guilt. Consider developing a habitual response of asking yourself "how can I reduce this harm going forward?" Consider interrupting your negative self-talk guilt response with "this is not helpful to me or anyone else. I will do better next time by doing _______ and that is what matters." Consider increasing your chances of doing good by refusing to punish yourself; refusing to waste that energy that you could be using for good.
*the exception is people who have control over the safety and nourishment of many others; then I will tell them when I think they did something wrong even though I probably have no faith at all in their intentions or willingness to change, because the stakes are much higher and I can't risk them being ignorant or able to feign ignorance, and I can't risk their example leading others to think that their behavior is okay.