Remorse
Remorse is an emotion experienced by an individual who regrets actions which they have done in the past[1] that they see as hurtful, or wrong. Remorse is closely similar to guilt and resentment.
When a person regrets an earlier action or failure to act, it may be because of remorse or in response to other consequences. People may express remorse through apologies.