Jews (or Israelites?) beat on their breasts on Yom Kippur, the Day of Atonement, and said, “Have mercy on me a sinner”. It was a public gesture, because it is not hidden from others.
When I was young and still a Roman Catholic, we used to, in church, beat our breast, i.e., knock with our right fist against our chest. We did this three times during the mass (service) when all present would say out loud a certain penitential prayer, and during the sentence “mea culpa, mea culpa, mea maxima culpa” (or, in English: “through my fault, through my fault, through my most grievous fault”).
I quote from a Roman Catholic web site:
A Confiteor is a penitential prayer where we acknowledge our sinfulness and seek God’s mercy and forgiveness. Confiteors have been part of Christianity from the beginning. St. Augustine notes that it was traditionally recited while striking the breast as a sign of humility, such as is the custom we have today of doing so during Mass when it is recited. The prayer below is the traditional form (sic) of the prayer. It was partially composed in the 8th century and then added to the Mass in the 11th century. The Confiteor in use in the Missal of Paul VI is a shortened version of this one.
I won’t copy and paste “the prayer below” which is mentioned, because the prayer is not addressed to the Father in the name of Jesus as our mediator (“For there is one God and one mediator between God and men, the man Christ Jesus.” 1 Tim 2:5), but is addressed to an angel plus a whole lot of persons who are still in their graves awaiting the Second Coming of our Messiah.
Beating on the chest is still being done in the Roman church:
September 27, 2011 “Catholics beating their chests again in new translation of Mass”, by Richard Antall – “My most grievous fault”: New English Missal translation brings back the repetition, triple beating of breast.