An excerpt from Secrets of Heaven by Emanuel Swedenborg, section #1317
The Lord regards nothing in us but our goal. No matter what thoughts we have thought or deeds we have done in all their countless permutations, as long as our purpose is good, these things are all good. When our purpose is bad, on the other hand, those things are all bad. Our final goal is what prevails in every single thing we think or do.
The angels with us are the Lord’s, and therefore what they govern inside us are our purposes. When they govern these, they also govern our thoughts and deeds, because all our thoughts and deeds are included in our purposes.
Whatever we aim at is our actual life. The aim brings everything we think and do to life, since (again) it embraces everything we think or do. So the nature of our goal determines what our life is like. A goal, or purpose, is nothing but love, because the only thing we can adopt as a purpose is something we love. Even those who think one way and act another still have something they love as their goal. Within the pretense or deceit itself lies the goal, which is self-love or materialism, and this is the joy of their life. Accordingly, as anyone can see, the nature of our life reflects the nature of our love.