It forces us to seek a remedy. Guilt as a feeling is meant to drive us into the arms of God's mercy. I must point out at this point that some people experience false guilt . They feel guilty for things over which they have no control. This kind of guilt is not healthy.
Confession is the appropriate response to true guilt.
Confession is the Christian way of taking out the garbage. It does not earn God's forgiveness. Confession makes that forgiveness, already won on the Cross, real to us. By confessing, we let go of our sin and renew our commitment to live God's way. Now, truth be told, many people are uncomfortable with confession.