Allah (swt) is the source of all infinite theoretical and practical perfections and beauties. Based on this, as much as one adorns oneself with the beautiful attributes of the divine essence, like knowledge, justice, forgiveness, kindness, mercy, wisdom and generosity, etc., would one be nearer to Allah (awj), and as much as the self is less reflective of those attributes would one be more distant. And even though these divine attributes are infinite and part of His essentially existent being, and it is impossible for Man to characterize himself with these attributes to their full extent, it would still be possible for him to be close to Allah (awj) relative to his capacity to reflect His divine attributes within his self.
Therefore, this matter of divine nearness and distance is not subjective, but an existential reality, with its peak at the prophetic level:
وَجَعَلْنَا مِنْهُمْ أَئِمَّةً يَهْدُونَ بِأَمْرِنَا لَمَّا صَبَرُوا ۖ وَكَانُوا بِآيَاتِنَا يُوقِنُونَ
We appointed from among them leaders who guided by Our command, when they became steadfast and believed firmly in Our signs.
So the prophetic status of closeness is on the practical level ‘they became steadfast’, and on the cognitive level ‘believed firmly in our signs’. And in the light of this we can read from the following verse, that what ascends to Allah (swt) is ones convictions and beliefs, not the action (explanation of this verse I posted here):
مَن كَانَ يُرِيدُ الْعِزَّةَ فَلِلَّـهِ الْعِزَّةُ جَمِيعًا ۚ إِلَيْهِ يَصْعَدُ الْكَلِمُ الطَّيِّبُ وَالْعَمَلُ الصَّالِحُ يَرْفَعُهُ ۚ وَالَّذِينَ يَمْكُرُونَ السَّيِّئَاتِ لَهُمْ عَذَابٌ شَدِيدٌ ۖ وَمَكْرُ أُولَـٰئِكَ هُوَ يَبُورُ
Whoso desireth power (should know that) all power belongeth to Allah. Unto Him good words ascend, and the pious deed doth He exalt; but those who plot iniquities, theirs will be an awful doom; and the plotting of such (folk) will come to naught.
From here we see that the Islamic view is not content just with good deeds, but places importance in the pure intention, and the motivation being closeness to Allah (swt). And there exist several verses in the Holy Qur’an indicating that the result of having wrong doctrines and intentions would lead man to recklessness:
لِّلَّـهِ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ ۗ وَإِن تُبْدُوا مَا فِي أَنفُسِكُمْ أَوْ تُخْفُوهُ يُحَاسِبْكُم بِهِ اللَّـهُ ۖ فَيَغْفِرُ لِمَن يَشَاءُ وَيُعَذِّبُ مَن يَشَاءُ ۗ وَاللَّـهُ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ
Unto Allah (belongeth) whatsoever is in the heavens and whatsoever is in the earth; and whether ye make known what is in your minds or hide it, Allah will bring you to account for it. He will forgive whom He will and He will punish whom He will. Allah is Able to do all things.
لَّا يُؤَاخِذُكُمُ اللَّـهُ بِاللَّغْوِ فِي أَيْمَانِكُمْ وَلَـٰكِن يُؤَاخِذُكُم بِمَا كَسَبَتْ قُلُوبُكُمْ ۗ وَاللَّـهُ غَفُورٌ حَلِيمٌ
Allah will not call you to account for thoughtlessness in your oaths, but for the intention in your hearts; and He is Oft-forgiving, Most Forbearing.
In the following verse, Allah (swt) gives an allegory when addressing the believers, which shows the existential correlation between one’s intention and the subsequent action taken in giving Man happiness, peace of mind and perfection in the form of closeness to Him:
وَمَثَلُ الَّذِينَ يُنْفِقُونَ أَمْوَالَهُمُ ابْتِغَاءَ مَرْضَاتِ اللَّهِ وَتَثْبِيتًا مِنْ أَنْفُسِهِمْ كَمَثَلِ جَنَّةٍ بِرَبْوَةٍ أَصَابَهَا وَابِلٌ فَآتَتْ أُكُلَهَا ضِعْفَيْنِ فَإِنْ لَمْ يُصِبْهَا وَابِلٌ فَطَلٌّ ۗ وَاللَّهُ بِمَا تَعْمَلُونَ بَصِيرٌ
And the likeness of those who spend their wealth in search of Allah’s pleasure, and for the strengthening of their souls, is as the likeness of a garden on a height. The rainstorm smiteth it and it bringeth forth its fruit twofold. And if the rainstorm smite it not, then the shower. Allah is Seer of what ye do.
(comment on this verse from DILP):
Spending and giving of what one wants to keep, benefits man twice over; it speeds up the process of inner purification as well as promotes the welfare of the human society. Islam lays special stress on the spending in the way of Allah because it is a universal religion, perfected and completed by Allah who has prescribed mercy for Himself in verses 12 and 54 of al An-am. Islam, when translated into action, takes the form of salat, Zakat and sadqa. And faith, unless proved by actions, is a bogus claim. Neither Allah accepts it nor His servants give it any importance.
If the spirit or the intention behind the spending is to seek pleasure of Allah, then. if the means are large the corresponding spending will also be substantial and big-hearted and if the means are moderate, even then the spending will be sufficient. When heavy rain falls the tall trees of a garden bring forth their fruit twofold, but even light rain is sufficient, because rooted very deep, they draw adequate nutrition from the soil.
In the days of the Holy Prophet, the early Muslims lived in a hostile environment. It was a period of test and trial. The overwhelming forces of falsehood made their lives a bed of thorns, their relentless persecution hunted them, therefore, in the face of the preponderant danger to their lives and property, they had to sacrifice whatever they owned, lives as well as possessions, whenever either or both of them were needed. Under such circumstances the minimum sacrifice deserves maximum reward.
This verse assures the sincere believers in particular and other members of the human society in general that every act of virtue has its own energy to make both the lives (here and hereafter) meaningful and rewarding, even if there were no external agents to nourish them.
 ‘believed firmly’ is translated here from the arabic word ‘to be certain’
 2:225; Comment (DILP): This verse came in a specific context, namely before Islam, it was a custom among the Arabs that when a husband avowed to discontinue conjugal relations with his wife, the wife was left in a lurch – neither a married woman nor a divorcee. The Quran ignores the swearing concerning disassociation with wives and gives four months for reconsideration and reconciliation; after which, if the husband still desires separation he should divorce his wife, otherwise the wife can refer the matter to the hakim shari’a (competent authority on Islamic laws) and obtain freedom from the bond of marriage to wed someone else.
Vain oath means unintentional swearing, which is a common habit with most people in their ordinary conversation. Allah will not hold any one accountable for vain oaths, but He will call His creatures to account for their real intentions and what they do. Verbal swearing has no value. However, swearing with full consciousness of the seriousness of the undertaking, binds the swearer to do as resolved provided the deed to be done is legal and good.