Suppose I sinned and then went to confession and was forgiven. Then at some later time, I still felt bad about the sin and I prayed for forgiveness again. Is that despair?
Is it guilt that you feel when you say you still felt bad about the sin?
It sounds a little more like scrupulosity to me; once the sin is forgiven it’s erased. Try to remind yourself that.
If you were truly despaired, you wouldn’t have gone to confession at all, because you’d have considered it useless.
To despair is to become convinced that God refuses to forgive our sins even if we repent. That has nothing to do with our natural feelings of guilt and regret. In this respect, confession doesn’t magically annihilate our guilt and regrets, but it opens the way for us to forgive ourselves, knowing that God forgives us if we repent.
From Catholic Encyclopedia:
Despair, ethically regarded, is the voluntary and complete abandonment of all hope of saving one’s soul and of having the means required for that end. It is not a passive state of mind: on the contrary it involves a positive act of the will by which a person deliberately gives over any expectation of ever reaching eternal life.
It is obvious that a mere anxiety, no matter how acute, as to the hereafter is not to be identified with despair. This excessive fear is usually a negative condition of soul and adequately discernible from the positive elements which clearly mark the vice which we call despair.
The sin of despair may sometimes, although not necessarily, contain the added malice of heresy in so far as it implies an assent to a proposition which is against faith, e.g. that God has no mind to supply us with what is needful for salvation.
You must have the absolute certitude that God forgives your sins, and that the Sacrament of Penance and Reconciliation is a Sacrament instituted by Christ in which He himself, through His ordained minister acting in persona Christi, wipes away all stain of sin and infuses sanctifying grace in your soul.
To still feel sorry about your past sins is not bad in itself. It is a practice to add at the end of every confession: “for these and for all the sins of my life…”. And it is good to always keep a penitent heart
If despair itself is a sin, then I’ve got a serious problem. It’s shaking my faith, and it’s not going anywhere.