Some say that if he doesn't repent, you cannot forgive him. Luke 17:3-4 implies this:
"If your brother sins against you, rebuke him; and if he repents, forgive him. And if he sins against you seven times in a day, and seven times in a day returns to you, saying, ‘I repent,’ you shall forgive him.”
But other texts do not have the condition of repentance:
“And whenever you stand praying, if you have anything against anyone, forgive him, that your Father in heaven may also forgive you your trespasses" (Mark 11:25).
What do we make of this?
Forgiveness cannot be complete, or bring full resolution, without repentance. But neither may forgiveness be withheld in a way that leads to vengeance or bitterness. If repentance is verbalized, it should be taken at face value and forgiveness must be extended (2 Cor 2:6). Only in extreme cases of insincerity should such repentance be questioned on the spot. You give them the benefit of the doubt and even extend a great deal of patience with repeat offenders (Matt 18:21-22).
If someone wrongs you and won't admit it, justifies it, or apologizes perfunctorily to get you off their back, your obligation is one of two directions. Either you let love cover a multitude of sin (Prov 10:12), thus you drop it and let it go, and work on a forgiving, non-bitter spirit in yourself (Eph 4:31; Heb 12:15). Or your obligation is to rebuke your neighbor so you don't bear his fault (Lev 19:17). This could mean just saying, "Look I don't have a grudge against you for this, but it seems like you really aren't acknowledging the wrong, and I'm concerned that you live rightly before God in this...." This probably needs to come from someone else, though, since you are the offended party. So this could involve taking another witness along in the second step of Matthew 18:16.
Which course you should take is a matter of wisdom, not absolute obligation. If you have pointed out someone's wrong once and they don't see it, you are probably clear of obligation, and need to work harder on letting it go yourself rather than getting them to see their wrong. It's different if you are in a close covenant relationship, like parent to child, or pastor to church member, and thus have a greater obligation to shepherd the person.
Neither course above allows for bitterness or for sweeping unaddressed sin under the rug. We must forgive, either way, meaning not holding on to a grudge, seeking vengeance or getting payback for our personal satisfaction. We do not have to chase every last suspicious behavior down to the ground. In fact that spirit is forbidden, and cannot be justified out of zeal for seeing others glorify God (Matt 7:3). We also should not wink at sin. This is quite the tightrope of wisdom to walk in a world of sinners!
Jesus does speak of withholding forgiveness, though. When He is with the disciples in the upper room after His resurrection, He commissions them with the Spirit: "If you forgive the sins of any, they are forgiven them; if you retain the sins of any, they are retained.” (John 20:23). People really balk at this today, but Jesus here really gave authority to human church leaders on earth to withhold forgiveness. This is related to the Matthew 18 process: if the offender won't hear the offended, and won't hear the 2-3 witnesses, AND won't hear the church leaders (apostles passed this authority on to elders, with the keys of the kingdom - Matt 16:19), then his sins are retained. Forgiveness is declared withheld and excommunication is the result. Even in that situation, though, we are obligated to have a spirit free from bitterness, eager to respond to their repentance with forgiveness.