Feeling guilty does not help. Regret does.
Guilt creates the impression in the mind that one is forever and intrinsically unworthy, which is not true of anyone. It is more productive to regret negative things that you have done with the wish to not repeat the same mistakes, to do better in the future and, if possible, to repair the harm that you did.
The main point is to avoid intentionally and maliciously harming others. However, if you happen to cause suffering to others as a result of your own confusion, you should blame the confusion, not yourself. You are not the confusion, you are not the anger, you are not the attachment, in the same way that you are not the flu, the fever, or the malaria that might affect you. You are just momentarily affected by these conditions. There is always a potential for change.