Who among us has not done something or said something that we are ashamed of? Unless you are a child and not yet self-aware, chances are you are. Something in the nature of a human brings out selfishness, spite, hatred, anger which can hurt another knowingly or unknowingly. This can manifest in myriad ways but probably caused pain to another. The funny thing is what ever you did, it was in the past and no longer reality. The only reality is in the now. This means there is no way for you to go back and undo what has been done and all you can do is deal with your actions in the present.
You may not be able to decide whether the person wronged should forgive you. What you can do however, is decide whether you want to forgive yourself. This is a non-trivial task as it is far easier to believe you have been wronged than to believe that you wronged someone. So acceptance comes first. With acceptance comes taking responsibility for and owning up to your own actions. Once you confess to yourself, hopefully your conscience will make you feel sorry which needs healing. The act of healing comes from being able to forgive yourself for what you did no matter how horrible. I make this argument parking for a minute the cycle of your action and consequential justice. Regardless, you still need to heal if not for any other reason than for your own wellness.
One way to practice forgiving is to meditate to forgive yourself. In this, you call into your conscious the actions that hurt another and imagine the hurt and pain they may have suffered. Imagine for a moment how you may have suffered if that were done to you and slowly in the present moment forgive yourself as much as you can. Depending on what you have done, this may take more than one attempt but hopefully this will result in forgiveness.