Feeling undeserving as a result of whatever 'it' may be sounds very much like regret to me.
There are many kinds of regret. I regret the death of my friend's father, but I do not regret my decision to have him killed. He was a dangerous man, and would have cost many innocent lives.