I think you have to know how you feel when you're sad and it's healthy to mourn if a relationship ends.
When I pray for another person, I am praying for God to open my eyes so that I can see that person as God does, and then enter into the stream of love that God already directs toward that person.