I understand there is a Buddhist teaching on guilt that says something like: “It is immoral to be so occupied with guilt that you don’t do the good you could be doing in the world”.
This view is supported by the science of morality. The “moral” reaction to guilt is to use it to motivate not repeating what you did wrong.
You would be acting immorally if you allowed your guilt to consume you so that you are no longer helping others and treating them fairly and thereby doing good in the world.