If one lends someone else money and realized that this person isn't going to pay, so the lender feels bad and doesn't want the person to have a sin and forgives the debt. Let's say the borrower randomly shows up to pay what he owed, can the lender accept it, or since he already was mochel he needs to tell the borrower that he was actually mochel it?
There are two aspects to it:
There's always a place for a free gift. One can always accept money without any previous interaction.
It depends if you forgave wholeheartedly or not. Sometimes you're "forced" to forgive and therefore it is not true and therefore your "forgiveness" changes nothing. However if, for example, you made a statement before two witnesses that that person does not owe you money - see #1.
Another option to your true forgiveness is that you decide (privately) to give him that money as Tzedakah and deduct that money from your Maaser. In that case, it is clear that he does not owe you anything indeed, as if he paid back.
To remind you that פריעת בעל החוב מצווה Returning the debt is a Mitzvah (so to say, see Erchin 22a), so the person is obligated to try to return the money anyway.