Works and deeds,” though, does not mean works and deeds solely the way they look in outward form. It also includes their deeper nature. Everyone knows, really, that all our deeds and works come from our intention and thought, for if they did not come from there they would be no more than motions like those of machines or robots. So a deed or work in its own right is simply an effect that derives its soul and life from our volition and thought, even to the point that it is volition and thought in effect, volition and thought in an outward form. It follows, then, that the quality of the volition and thought that cause the deed or work determines the quality of the deed or work. If the thought and intent are good, then the deeds and works are good; but if the thought and intent are evil, then the deeds and works are evil, even though they may look alike in outward form. A thousand people can behave alike—that is, can do the same thing, so much alike that in outward form one can hardly tell the difference. Yet each deed in its own right is unique because it comes from a different intent.
Take for example behaving honestly and fairly with an associate. One person can behave honestly and fairly with someone else in order to seem honest and fair for the sake of self and to gain respect; another person can do the same for the sake of worldly profit; a third for reward and credit; a fourth to curry friendship; a fifth out of fear of the law and loss of reputation and office; a sixth to enlist people in his or her cause, even if it is an evil one; a seventh in order to mislead; and others for still other reasons. But even though all of their deeds look good (for behaving honestly and fairly toward a colleague is good), still they are evil because they are not done for the sake of honesty and fairness, not because these qualities are loved, but for the sake of oneself and the world, because these are loved. The honesty and fairness are servants of this love, like the servants of a household whom their lord demeans and dismisses when they do not serve.
People behave honestly and fairly toward their colleagues in a similar outward form when they are acting from a love of what is honest and fair. Some of them do it because of the truth of faith, or obedience, because it is enjoined in the Word. Some of them do it for the sake of the goodness of faith or conscience, because they are moved by religious feeling. Some of them do it out of the good of thoughtfulness toward their neighbor, because one’s neighbor’s welfare is to be valued. Some of them do it out of the goodness of love for the Lord, because what is good should be done for its own sake; so too what is honest and fair should be done for the sake of honesty and fairness. They love these qualities because they come from the Lord, and because the divine nature that emanates from the Lord is within them. So if we see them in their true essence, they are divine. The deeds or works of these people are inwardly good, so they are outwardly good as well; for as already noted, the nature of deeds and works is entirely determined by the nature of the thought and intent from which they stem, and apart from such thought and intent they are not deeds and works but only lifeless motions.
We may gather from this what is meant by works and deeds in the Word.
from Heaven and Hell, Section 472