The Lord has provided us counsel about how to forgive. The Church of Jesus Christ website has this to say about forgiving others. 'In addition to seeking forgiveness for our own sins, we must be willing to forgive others. The Lord said: "Ye ought to forgive one another; for he that forgiveth not his brother his trespasses standeth condemned before the Lord; for there remaineth in him the greater sin. I, the Lord, will forgive whom I will forgive, but of you it is required to forgive all men"' (D&C 64:9-10)
We also have counsel regarding repentance. The site states that the most vital part is Faith. This is because ' Repentance is an act of faith in Jesus Christ an acknowledgment of the power of His Atonement. We can be forgiven only on His terms. As we gratefully recognize His Atonement and His power to cleanse us from sin, we are able to "exercise [our] faith unto repentance" (Alma 34:17)'
Sorrow for the sin is the next step in repentance followed by action. This action is confession. This action may also require the help of a bishop depending on the the degree of sin that was committed. This is part of a healing process and is not a punishment.
The final steps of repentance is that of Abandonment of Sin, Restitution, and continuing to live a righteous life. "By this ye may know if a man repenteth of his sins behold, he will confess them and forsake them" (Doctrine and Covenants 58:43)