The Buddha gave a beautiful teaching on the development of lovingkindness called the Metta Sutta (also known as the Karaniya Metta Sutta). I’ve adapted the words of the sutta to formulate them as an aspiration that can be repeated in a prayer-like way.
In order that I may be skilled in discerning what is good, in order that I may understand the path to peace,
Let me be able, upright, and straightforward, of good speech, gentle, and free from pride;
Let me be contented, easily satisfied, having few duties, living simply, of controlled senses, prudent, without pride and without attachment to nation, race, or other groups.
Let me not do the slightest thing for which the wise might rebuke me. Instead let me think:
May all beings be well and safe, may they be at ease.
Whatever living beings there may be, whether moving or standing still, without exception, whether large, great, middling, or small, whether tiny or substantial,
Whether seen or unseen, whether living near or far,
Born or unborn; may all beings be happy.
Let none deceive or despise another anywhere. Let none wish harm to another, in anger or in hate.”
Just as a mother would guard her child, her only child, with her own life, even so let me cultivate a boundless mind for all beings in the world.
Let me cultivate a boundless love for all beings in the world, above, below, and across, unhindered, without ill will or enmity.
Standing, walking, seated, or lying down, free from torpor, let me as far as possible fix my attention on this recollection. This, they say, is the divine life right here.
Translated and adapted by Bodhipaksa from the Pali Metta Sutta.