Arcana Coelestia # 3055
3055. 'Outside and away from the city' means removed from matters of doctrine. This is clear from the meaning of 'the city' as doctrine, dealt with in 402, 2449, from which it is evident that 'outside the city' means outside of, thus removed from, matters of doctrine.
3055a 'Near a well of water' means to receive the truths of faith. This is clear from the meaning of 'a well of water' as the Word, the source of the truth of faith, and also truth itself, dealt with in 2702. The phrase 'a well of water' is used in this verse, but 'a spring' in all that follows; and for the difference between the two in the internal sense - between 'a well of water' and 'a spring' see the paragraph just referred to.
Heart
The heart means love. A good heart means love to the Lord and to the neighbor, while a hard or stony heart means the love of self or the world -- riches and things. When the psalmist asks the Lord to search his heart, he wants the Lord to see what it is that he loves. And we are what we love. What we eat may form our earthly body, but it's only temporary, what we love forms our spiritual body, beautiful or ugly as we have chosen. It's interesting to note that the first multi-cellular motion of our embryo is the pulsating that starts in a twist of blood vessel that is to become our heart, and the last motion of our natural body is our heartbeat. It is there for all of our natural life. And of course there is a beating heart in our spiritual bodies when we come to put them on.