In
2 Kings 5:26.What did he mean his heart was with him?
That Gehazi did not get away what he had done deceitfully. Elisha was a prophet. The angels were constantly with him. He performed a lot more miracles than this, this was a simple one.
If you still don't understand. Let me give you an example. Samuel was also a prophet. Now Jehovah had sent Saul to Samuel to have him anointed as king of Israel. Notice how Samuel is informed:
"The day before Saul came, Jehovah had told Samuel: “Tomorrow about this time, I will send to you a man from the land of Benjamin. You must anoint him as leader over my people Israel, and he will save my people from the hand of the Phi·lisʹtines. For I have seen the affliction of my people, and their outcry has reached me.” When Samuel saw Saul, Jehovah told him: “Here is the man of whom I said to you, ‘This is the one who will govern my people.’”
Then Saul approached Samuel in the middle of the gate and said: “Tell me, please, where is the house of the seer?” Samuel answered Saul: “I am the seer. Go up ahead of me to the high place, and you will eat with me today. I will send you away in the morning, and I will tell you all that you want to know. As for the donkeys that were lost three days ago, do not worry about them, for they have been found. And to whom does all that is desirable of Israel belong? Is it not to you and to the whole house of your father?”-1 Samuel 9:15-20.
If you notice Jehovah talks with Samuel the prophet and reveals to him everything he wants to.