"And forgive us our debts, as we also have forgiven our debtors."
"and forgive us our sins, for we ourselves forgive everyone indebted
to us" -Luke (NRSV)
"And forgive us our trespasses, as we forgive them that trespass
against us" -Anglican BCP
"Forgive us our sins as we forgive those who sin against us" -ELLC
So there is this equivalence drawn in translations, between sin and debts. A ledger, recording what is owed, what marks there are against us.
You should consider the biblical tradition of debt jubilees, and the prohibitions against usury. It was considered very important in the ancient world that debts not come to exceed what could be paid, and that happening was a major source of unrest. See anthropologist David Graeber's excellent short book available free online, Debt: The First 5,000 Years, on this and how money emerged from recording of debts, not from barter.
The forgiving of debts, like the recording of debts, is a formal procedure, which say a bank might undertake after a bankruptcy petition. The forgiving of a sin, requires certain criteria depending on tradition, but usually including: repentence, penance, determination not to repeat. The determination of who gets into Heaven is considered unknowable in this life, but the gate is narrow, and attaining the needed forgiveness of sins before death usually considered essential.
There is a phrase I like:
"Forgiveness doesn't mean no consequences."
A lot of research points towards forgiving others as beneficial to the forgiver. That's a part of your energy released. It is a choice for inner peace. It doesn't mean assuming a person won't commit their crime again. It doesn't mean they don't have to face mandated penalties of the community, or can avoid the response their reaction has created among their peers.
"1. Mind precedes all mental states. Mind is their chief; they are all
mind-wrought. If with an impure mind a person speaks or acts suffering
follows him like the wheel that follows the foot of the ox.
Mind precedes all mental states. Mind is their chief; they are all mind-wrought. If with a pure mind a person speaks or acts happiness
follows him like his never-departing shadow
"He abused me, he struck me, he overpowered me, he robbed me." Those who harbor such thoughts do not still their hatred.
"He abused me, he struck me, he overpowered me, he robbed me." Those who do not harbor such thoughts still their hatred.
Hatred is never appeased by hatred in this world. By non-hatred alone is hatred appeased. This is a law eternal.
There are those who do not realize that one day we all must die. But those who do realize this settle their quarrels."
-opening of The Dhammapada, a collection of sayings of the Buddha
To thirst for vengeance, to harbor grudges, is allowing another to condition your mind. To forgive is a choice about how you use your mind, what thoughts you occupy it with.
There are Buddhist practices that may help: