All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Fearing Allaah is one of the best deeds and acts that bring one closer to Allaah and it is something by which Allaah described His Angels, His Prophets and His pious slaves. The real fear is that which urges a person to perform good deeds and incites him to abandon committing bad deeds, and which does not lead a person to despair from the Mercy of Allaah.
What you saw in your dream is not necessarily a warning for you; rather, it could be just what one thinks about when he is awake (i.e. imagination or working of sub-consciousness), and this is what it appears to be, as you mentioned that you were thinking of abandoning sins and repenting from them while you had a feeling of fear [from the punishment of Allaah]
In any case, it is an obligation on every Muslim to repent to Allaah and take the initiative to do so because repentance is an immediate obligation. Allaah Says (what means): {O you who believe! Turn to Allaah with sincere repentance!}[Quran 66:8] Allaah also Says (what means): {And hasten to forgiveness from your Lord and a garden [i.e. Paradise] as wide as the heavens and earth, prepared for the righteous.}[Quran 3:133]
Moreover, a Muslim should trust his Lord, as Allaah treats His slave according to his expectation from Him; so he should be certain that the Mercy of Allaah is vast and that His Forgiveness encompasses all the sins of the people no matter how great they are. Allaah Says (what means): {Say, “O My servants who have transgressed against themselves [by sinning] do not despair of the mercy of Allaah. Indeed, Allaah forgives all sins. Indeed, it is He who is the Oft-Forgiving, the Most Merciful.”}[Quran 39:53]
Besides, you should be careful not to despair of the Mercy of Allaah because if you do so, you commit a much graver and greater sin; Allaah Says (what means): {…and never give up hope of Allaah’s Mercy. Certainly no one despairs of Allaah’s Mercy, except the people who disbelieve."}[Quran 12:87] For more benefit on the conditions of repentance, please refer to Fatwa 86527.
On the other hand, a person is not held accountable for the mere feeling of not having any hope in life. The Prophet said: “Allaah has forgiven my nation for the whispers that they have as long as they do not speak about it or act according to it.” [Al-Bukhari and Muslim]. But you should be careful that such a feeling does not lead to the forbidden matters which you mentioned in your question like wishing to die and the like, because wishing for death is something that is forbidden in the Sharee’ah and we clarified this in Fatwa 105108 and we mentioned there the supplication in which one puts the matter in the Hands of Allaah.
In addition to this, it could be that if the appointed time of the death of a Muslim is delayed, then this is good for him so that he would perform more good deeds or that he would try to please Allaah by giving up sins and seeking Allaah’s Forgiveness, as stated in the Sunnah.
As regards how to gain the love of Allaah and get closer to Him, then please refer to Fatwa 83931. Indeed, the signs of Allaah’s Love for a person appear when Allaah enables him to do good as in the Qudsi Hadeeth in which the Prophet said: “Allaah says: “My Slave does not get closer to Me with anything more beloved to Me than something that I have enjoined upon him, and My Slave keeps getting closer to Me by performing Nawaafil (supererogatory acts of worship) till I love him, and if I love him, I become his hearing with which he hears, and his seeing with which he sees, and his hand with which he strikes, and his leg with which he walks; and if he asks something of Me, I would surely give it to him, and if he takes refuge in Me, I would surely grant him refuge.” [Al-Bukhari]
Among the signs of the love of Allaah for a person as well is that the people would love the person who is beloved by Allaah. The Prophet said: “If Allaah loves a person, He calls Jibreel (Gabriel) saying, 'Allaah loves so-and-so; O Jibreel! Love him.' Jibreel would love him and make an announcement amongst the inhabitants of the Heaven. “Allaah loves so-and-so, therefore you should love him also.”; and so all the inhabitants of the Heaven would love him, and then he is granted the pleasure of the people on the earth.” [Al-Bukhari and Muslim]. Besides, there are other signs of the love of Allaah for a person.
As regards speaking to Allaah, then when a Muslim prays, he speaks to Allaah and Allaah speaks to him, when a person says “Al-Hamdu Lillaahi rabil-‘aalameen”, Allaah would say: “My slave has praised Me….” as per a long Hadeeth. However, if you mean that you speak to Him directly like it happened with some Prophets, like Moosa (Moses ) and our Prophet Muhammad then this is not possible in this worldly life. So, wishing such a thing is nonsense.
In addition to this, seeing Allaah in this worldly life is not possible as the Prophet said: “You will not see your Lord until you die.” [Ahmad and Al-Haakim]
With regard to seeing Him in a dream, then this is possible and it is permissible to have such a wish.
Concerning the Muslim’s feeling that death will bring him closer to meeting Allaah, then it is permissible to have such a feeling because this is a reality as death is the first stage of the Hereafter.
Finally, dear sister, we would like to advise you to be keen on acquiring beneficial knowledge and perform good deeds and keep company with righteous Muslim women, because a person who keeps company with righteous people shall not suffer.
Allaah Knows best.