When she unintentionally does think about him and miss him, she has to recall the pain she's been through, so she will never go through it again.
When she unintentionally thinks about him and misses him, she has to recall the pain she's endured, so she will never go through it again.