Guilt and shame are human emotions that non-OCD people experience, just like anxiety, that play an important role in life. However, with OCD these emotions can often be malignant and actually can hinder the growth we need to be a better person.
How do you tell the difference? You don’t need to tell the difference between obsessive guilt and “real” guilt— the answer in both those cases is the same. You just sit with it. On the other hand, we can often, perhaps as a compulsion, say or do things to ourselves to inflict guilt and shame on purpose because we think it’s what we should feel, because it will absolve us. This, whether a compulsion because of OCD or some other reason, is not helpful. It will not change the past or make us better persons in the future if we remain miserable, our will and agency broken because we are forcing ourselves to only feel pain. But neither should we be afraid of guilt, whether OCD or real. The approach is the same. Let it be there, don’t suppress it, don’t try to make it worse, etc. It will pass and when you have the calmness and perspective to think about it more clearly, you may have clarity. Or it still may take some more time and perspective. At the end, you might say what you did was anywhere from awful to saintly, though most people’s experience with Real Event OCD results in “well it’s bad but not as much as my OCD said it was.” For me, it was “others might not agree with me, but I think this is bad and would like to improve as a person, though that may take some time.” And y’know, that acknowledgement, divorced of any need to punish myself or to rehearse the event in my head over and over and try to drum up the courage to act differently, doesn’t feel so horrible. Just to offer another perspective on that. You can at least feel comfort in knowing that, wherever guilt appears, there’s only one approach to take and that it will pass and that you can still enjoy the greener pastures when they come.