When you feel sorry for what you've done, it distresses you, cause you to be sad and you grieve in heaviness, that's what happened to king Herod because something he has promised in unguarded moments, will not make him back down on it, because again he's concerned with his personal dignity and personal reputation.

Yet I am glad now, not because you were pained, but because you were pained into repentance [and so turned back to God]; for you felt a grief such as God meant you to feel, so that in nothing you might suffer loss through us or harm for what we did.

For godly grief and the pain God is permitted to direct, produce a repentance that leads and contributes to salvation and deliverance from evil, and it never brings regret; but worldly grief (the hopeless sorrow that is characteristic of the pagan world) is deadly [breeding and ending in death].