When it is said
The homily it comes from gives these words to the reader to cry in their soul whenever they stand to pray.
It is not part of any church service.
Where it comes from
Author by tradition
From a homily credited to St Ephrem
St Ephrem the Syrian served as a deacon in Nisibis and later in Edessa. He died in AD 373. Syriac manuscripts credit him with the verse homily On Admonition and Repentance, where this prayer is found. The scholar Thomas Lamy printed it in 1882 from a copy made at Edessa in AD 873-74. Writers later put hundreds of works under Ephrem’s name, so not every homily credited to him is his own.
Thomas Lamy, Sancti Ephraem Syri Hymni et Sermones, vol. I (Mechlin, 1882), archive.org; Ephrem the Syrian, Wikipedia
Let go of anger, then pray
The homily warns that it is blasphemy to pray to God while you are angry. It sets Christ, Who prayed on the cross for the men who were killing Him (Luke 23:34), beside the angry person, who is only dust. Its advice is short: “Leave off rage and then pray.” Later the homily gives these words for the prayer itself.
The Scripture in it
But the tax collector stood at a distance, unwilling even to lift up his eyes to heaven. Instead, he beat his breast and said, ‘God, have mercy on me, a sinner!’
But I tell you, love your enemies and pray for those who persecute you …
Bible text: Berean Standard Bible, public domain.