“The greatest portion of peace of mind is doing nothing wrong. Those who lack self-control live disoriented and disturbed lives.” Seneca, Moral Letters.
If you are clear about what is right and wrong in your own mind, peace of mind is easier to come by. Similarly, being certain of what constitutes a transgression and knowing what the right outcome is ought to make it easier (and quicker) for you to take corrective action – you can set a crooked thing straight, ask forgiveness, make amends.
But what if a wrong is done against you? Being prepared with a right course of action (understanding, forgiveness, graceful avoidance perhaps?) can help you maintain peace of mind and not lose your head.