You have heard that it was said to those of ancient times, 'You shall not murder'; and 'whoever murders shall be liable to judgment.' But I say to you that if you are angry with a brother or sister, you will be liable to judgment .... You have heard that it was said, 'You shall not commit adultery.' But I say to you that everyone who looks at a woman with lust has already committed adultery with her in his heart.
Matthew 5: 21-22, 27-28.
I see the Sermon on the Mount get used quite a bit to demonstrate just how sinful everyone is -- while you may not have physically murdered someone, if you were angry with them, that's just as bad. While you may have been physically faithful to your wife, looking at a non-wife woman is just as bad. Emotions and thoughts carry as much weight as actions do in the eyes of God. When you finally stand before God, He'll still have a fierce judgment for you even if all you did was think angry thoughts towards another person.
Yet, if thoughts carry that much weight, hold the same merit as actions do, does that mean that it works in reverse? Say I come across a starving person, and think loving, compassion thoughts towards him, or think about how much I'd love to give him food, and yet physically don't give him anything.
I highly doubt anyone would tell me that thinking about giving him food was just as good as giving him actual food.
Say person A is murdering person B, and I happen to stumble across the crime. I stand there, thinking that I should really stop person A, even picture myself doing so. Yet, I just watch as person B gets killed.
No one would congratulate me for stopping such an awful crime, even though I had good intentions towards doing so.
And we see this same situation in the Bible -- faith without works is dead. If a brother or sister is naked and lacks daily food, and one of you says to them, 'Go in peace; keep warm and eat your fill," and yet you do not supply their bodily needs, what is the good of that? James 2: 14-16
Thoughts alone don't seem to carry equal weight when it comes to being judged. Bad thoughts alone are enough to get one condemned, no matter what the action is, but good thoughts alone aren't enough to escape condemnation.