I think guilt has to do specifically with culpability, whereas shame has to do with the way you feel about your culpability. Or perhaps the way you perceive society to judge you based on your culpability (to the extend that there is public consensus of your culpability).
And pride is the flip side to shame. It's about how you feel about your positive accomplishments.
And in both cases, I think the reason you feel good or bad has largely to do with how you suspect society perceives you, and what that may or may not portend for your future, based on your positive or negative cultural capital.