As a mother would risk her life
to protect her child, her only child,
even so should one cultivate a limitless heart
with regard to all beings.
– Karaniya Metta Sutta
You should be as devoted to cultivating and protecting your goodwill to make sure that your virtuous intentions don’t waver. This is because you don’t want to harm anyone. Harm happens when there’s a lapse in your goodwill, so you want to do whatever you can to protect this attitude at all times. This is why, as the Buddha says toward the end of the [Metta] Sutta, you should stay determined to practice this form of mindfulness: the mindfulness of keeping in mind your wish that all beings be happy, to make sure that it always informs the motivation for everything you do.
This is why the Buddha explicitly recommends developing thoughts of metta [i.e. goodwill; loving-kindness] in two situations where it’s especially important—and especially difficult—to maintain skillful motivation: when other people are hurting you, and when you realize that you’ve hurt others. If other people are harming you with their words or actions—“even if bandits were to carve you up savagely, limb by limb, with a two-handled saw”—the Buddha recommends training your mind in this way:
“Our minds will be unaffected and we will say no evil words. We will remain sympathetic, with a mind of goodwill, and with no inner hate. We will keep pervading these people with an awareness imbued with goodwill and, beginning with them, we will keep pervading the all-encompassing world with an awareness imbued with goodwill—abundant, expansive, immeasurable, free from hostility, free from ill will.”
In doing this, the Buddha says, you make your mind as expansive as the River Ganges or as large as the earth—in other words, larger than the harm those people are doing or threatening to do to you. When you can maintain this enlarged state of mind in the face of pain, the harm that others can do to you doesn’t seem so overwhelming, and you’re less likely to respond in unskillful ways. You provide protection—both for yourself and for others—against any unskillful things you otherwise might be tempted to do.
As for the times when you realize that you’ve harmed people, the Buddha recommends that you understand that remorse is not going to undo the harm, so if an apology is appropriate, you apologize, and then you resolve not to repeat the harmful action again. Then you spread thoughts of goodwill in all directions.