Allah (swt) in this verse teaches us how to remedy the hearts diseases, such as wishing what Allah (swt) has preferred some people over others by money, knowledge, or property…. However, wishing the discontinuation of the blessings from others is the envy whereas, wishing for what Allah (swt) has made others exceed others without the desire of its discontinuation is an entrance to the envy, so Allah (swt) closes it in this verse.
(… وَاسْأَلُوا اللَّهَ مِن فَضْلِهِ…) (…And ask Allah of his bounty…): The Prophet (saws) said:
“Ask God for some of His bounty, for God likes to be asked, and the most excellent worship is expectation of relief.”[1]
That is, when you see the bounty of Allah, directly ask for his bestowments which gives relief in life for you and your family, neighbours and your nation as well. Allah (swt) says is very close to us, as He (swt) states:
وَإِذَا سَأَلَكَ عِبَادِي عَنِّي فَإِنِّي قَرِيبٌ ۖ أُجِيبُ دَعْوَةَ الدَّاعِ إِذَا دَعَانِ
(And when My servants ask you, concerning Me – indeed I am near. I respond to the invocation of the supplicant when he calls upon Me.) (Al-Baqara: 186)
He (swt) with us everywhere, so you have to feel this closeness, but there are conditions:
فَلْيَسْتَجِيبُوا لِي وَلْيُؤْمِنُوا بِي لَعَلَّهُمْ يَرْشُدُونَ
(So let them respond to Me [by obedience] and believe in Me that they may be guided.) (Al-Baqara: 186)
So you have to obey Allah (swt) and believe in him, then Allah (swt) responds to you in return.
( إِنَّ اللَّهَ كَانَ بِكُلِّ شَيْءٍ عَلِيمًا… ) (…Indeed Allah is ever, of all things, Knowing.): Allah (swt) knows that which deceives the eyes and what the breasts conceal and He knows the secret and what is more hidden as well. So that, the soul diseases are treated, especially in the believers.
[1] Sunan At-Tirmithi, Book of supplications, chapter of expecting the relief, Hadith No. 3571.