Part of God’s requirement to obtain forgiveness of your past sins is that you forgive all who have offended you.
The Lord said:
14 For if ye forgive men their trespasses, your heavenly Father will also forgive you:
15 But if ye forgive not men their trespasses, neither will your Father forgive your trespasses. (Matthew 6)
If you do not forgive others, you will bring yourself under condemnation:
And ye shall also forgive one another your trespasses; for verily I say unto you, he that forgiveth not his neighbor’s trespasses when he says that he repents, the same hath brought himself under condemnation. (Mosiah 26:31)
This condemnation comes because God’s justice requires him to judge you with the same standard with which you judge others:
For with what judgment ye judge, ye shall be judged: and with what measure ye mete, it shall be measured to you again. (Matthew 7:2)