Your apology needs to be asloud as your disrespect was.
Except you are the proudest person in the world, you must show some remorse for going out of line. Every apology begins with the two magic words: I am sorry and its likes. But your expression of sorriness needs to be as loud—or even louder—than the wrongdoing itself. As such, you need to show that you feel bad about wronging that person and how you would have preferred things to be done better. If possible, criticize your own actions and explain how much of an ass you were stooping low.
The next thing you should do is admit responsibility for your actions. To simply put it, acknowledge what you did. Do not try making amends just because you feel your friend needs it, but because you know you have actually done something wrong to them. In this case, you need to empathise with the person and demonstrate that you really understand how you must have made them feel. There are no rooms for assumptions, just simply try to put yourself in that person’s shoes and imagine their feelings. Turn every stone.
It is vital to ask for forgiveness, but you need to as well bear it in mind that the sufferer of your wrongdoing may not be ready to let go just yet. Rather than pushing to quickly conclude the seemingly legal proceedings, it is your duty you give them time to process everything. Meanwhile, have a careful thought about this step to consider the things you can do that may be helpful. Do not resort to token gestures and empty promises, as those will do more harm than good. Do not also go overboard out of guilt.
Now The Assurance
Very well, it is one thing to apologize and another to make amends. And, it is a completely different thing to assure the person that you will not make them feel so bad like this ever again. If you wanted to make promises, this is the right time and the right way to do it. With all the resources at your disposal, you need to explain that the conundrum will not be repeated in future. This step is an important one, especially in a romantic relationship, because that person needs to have the peace of mind that you will never hurt them in such a way again. By now, it is obvious that saying sorry alone does not cut it. Apologizing is a conscious effort and needs to be done properly.