John 1:16 you've been given grace upon grace. Where sin (to include unforgiveness) abounds, grace show up in super abounds (Rom 5:20). Grace is how we are saved thru faith (Rom 5;1-2, Eph 2:8). Whenever the indwelling Holy Spirit reveals sin in our life. We are to listen, acknowledge/admit via confession, change direction, & move forward in thanksgiving.
Matt 6 teaches God forgave us, setting an example & we should follow His lead. Not forgiving one another interferes with our relationship with God. It doen't teach that our salvation is based on this forgiveness. Scripture is clear our salvation isn't predicated on our forgiveness of others, but, on belief in Christ's sin payment & resurrection (Jn 3:16, Eph 2:8, 2 Tim 1:9, Tit 3:5, 1 Jn 2:2, 4:10 to name just a few).
Harboring unforgiveness toward someone isn't pleasing to God. Sin always manifests somewhere, our prayer's not being heard, our health, relationships, our scriptural understanding etc. Bottom line, we should forgive others because God, through Christ, has forgiven us (Ephesians 4:32). To Christ be all praise, glory & honor! Amen