There are non-mysterious, rational, game-theoretic reasons for forgiveness, and the post I linked to is more about those. For example, if someone makes a mistake or takes an action and then changes her mind about it when she sees the consequences, their past behavior is less likely to predict their future behavior in similar situations. If she apologizes in that situation, when you "forgive" her, you're really saying "I recognize your regret, and I'm not that worried that you'll do it again, so don't worry about it" and also "I'm not angry and therefore you don't have to worry about my trying to harm you right now or in the future." Imagine if someone backs into your car in a parking lot, then stops to look at what happened, is horrified at what happened and apologizes. Forgiving this person would be of this type.
Then there's another type of forgiveness which is more mysterious. This is the type where someone did something clearly wrong with full intent, and possibly has not even asked for forgiveness. Imagine someone harming or killing a loved one, and expressing zero remorse. In fact, we do see people publicly forgiving the aggressor in exactly such situations. This is another type of forgiveness. Given the chance, the aggressor might well harm even more loved ones. What function can this serve? My comment:
There's an internally, psychologically adaptive function to forgiveness as well, and it's the dirty little secret of this otherwise proud aspect of being human. When you say "I forgive you" to someone who's wronged you - perhaps in a way that harmed you irreparably - you're at least partly saying, "What you've done is insignificant enough that I can put it out of my mind." You're declaring dominance over the other person in a way, and this is why once accomplished, forgiveness makes you feel better. The strongly negative reaction I often receive when telling people this, is very similar to the reaction you get when you're pointing at other status-signalling behaviors that everyone would rather not think about as such.Depression is related to lack of forgiveness, so this stranger kind of forgiving could be partly protective. If in fact forgiveness is just covert dominance display, then you could also explain depression related to not-forgiving partly as a result of lost social status associated with being the victim of a crime.
Interestingly, in legal proceedings, this expression of forgiveness occurs at sentencing - which is interesting for two reasons. First, it provides the maximal audience, and would therefore be the best place to announce something that is expected to change social status. Second, this is the concrete expression of the aggressor's material punishment. If the aggressor was really being forgiven, wouldn't the forgiver ask for the charges to be dismissed? (In fact I can't think of an occasion where someone has forgiven an at-large murderer of a family member; if they exist, certainly they're more rare.) Furthermore, the language accompanying such forgiveness, by the forgiver or their audience, is about "rising above" the situation or aggressor - showing superiority to them. Also supporting this idea, it's also notable that unrepentant wrongdoers who are forgiven in this manner often react poorly to the display of forgiveness.