You are correct that as a virtue, forgiveness needs to be for the other. Yet, it takes time to develop a motivation of goodwill toward someone who was cruel. There is nothing dishonorable about having, as one’s initial motivation, a desire for self-preservation. To use a physical analogy, if your knee is hurting, is it selfish to seek medical help? If our heart is broken, is it selfish to try to mend that broken heart? An initial focus on self that changes to a concern for the other is a typical pathway for growing in the virtue of forgiveness.