When one looks deeply and intently at someone else, that person will turn around and return the look, because the penetrating gaze awakens the core of the soul. You have made a "connection". A spiritual connection.
Thought has the same effect. Bringing someone to mind has the effect of arousing that person's innermost powers. Bringing someone to mind when praying is beneficial to both parties: to the one doing the praying, and the one being prayed for. "We pray for Rachamim, for Compassion. The Gemara says, "Even if the sword is on your neck, don't refrain from Rachamim. " This is usually interpreted, "Don't stop praying, asking G-d for compassion."
Rabbi Shlomo Carlebach zt"l wrote: Reb Berish Aushpitziner interpreted it differently, "What do you do at the last minute if the sword is on your neck? At that moment the only thing you can do is have compassion on somebody else. Then you open gates in Heaven for compassion, and it can come to you too. HAVE Rachamim, don't ask for it."
Rachamim is on the level of prophecy. If I have compassion on somebody who is in bad shape, then I have a vision of how that person could be. I compare what he is to what he could be and I say, "Oy Vey, I have to help you to get there." This is very important for peace, because sometimes we don't want to make peace with someone because we lost the vision of how that person could be. The highest peace between people is when they know how each other could be, and how they will be.
A person has to live in two worlds. We have to live in a world where there is evil and we are fighting it, and we have to live in a world where there is no evil, like after Moshiach has come. The highest combination of these two worlds is Rachamim. That means I see you the way you are, but I also know how you could be on the Moshiach level.
When someone has pain, and I feel that pain, that means I love the person. If someone hurts himself and has a little bit of pain, deep down it brings back all the pain he ever went through. If you are connected to him on the level of Rachamim then you feel with him all the pain he ever felt, in this lifetime and in other lifetimes. If you feel that pain, you have to make peace with the other person, and you also know how to do it. "
To pray for someone else, visualize that person, have them in mind as you pray. The compassion that you are asking Heaven to show them, will also be shown to you. If you Daven for someone else, that which you Daven for will be given to you first.