The Shaytaan whispers to him to make him imagine a form for Allah, may He exalted, so that he can attain the level of ihsaan!
Question

                I am trying, in acts of worship that have to do with dhikr, such as prayer and supplication (du‘aa’), to worship Allah as if I can see Him, hence I developed the habit of doing something but I do not know whether it is correct or not. That is, I try to imagine Allah in front of me as I am praying, for example, but the closest thing my weak human mind can think of is the image of a human being. I know that this is the farthest removed from the Sovereign who has none that is like unto Him. I also try to imagine myself, when I am prostrating for example, as if I am in front of the Ka‘bah, and I do indeed feel that I am close to Allah, but I also do not feel perfectly close to Allah, because I understand that Allah is far greater than that. I hope that you understand that my issue is not waswasah (whispers from the Shaytaan) but I want to get closer to Allah, so please advise me.
Praise be to Allah.
    Firstly: 

    You should understand that Allah, may He be exalted, is screened from His 
    creation in this world, so no human can see him in this world, neither the 
    Prophet (blessings and peace of Allah be upon him) nor anyone of lesser 
    standing. 

    The Mother of the Believers ‘Aa’ishah (may Allah be pleased with her) said: 
    Whoever claims that Muhammad (blessings and peace of Allah be upon him) saw 
    his Lord has fabricated a great lie against Allah. Narrated by al-Bukhaari 
    (4855) and Muslim (177). 

    Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: The imams 
    (leading scholars) of the Muslims are unanimously agreed that no one among 
    the believers can see Allah with his own eyes in this world; they only 
    disagree concerning the Prophet (blessings and peace of Allah be upon him) 
    in particular. However the majority of imams are of the view that he did not 
    see Him with his own eyes in this world. This is what is indicated by the 
    saheeh reports that have been proven from the Prophet (blessings and peace 
    of Allah be upon him) and the Sahaabah and imams of the Muslims.

    Majmoo‘ al-Fataawa 
    2/335 
If 
    humans – all humans – have been prevented in this world from seeing Allah, 
    then humans – all humans – are also incapable of comprehending His true 
    essence, may He be glorified, or the exact nature of any of His attributes, 
    because humans cannot imagine anything correctly unless they have seen it or 
    have seen something that resembles or is similar to this thing, so that they 
    can move, in the imagination, from the image of that which they have seen to 
    the image of that which they have never seen. 

    Based on that, you should understand that whatever image you imagine or that 
    crosses your mind, Allah, may He be exalted, is different from that. Indeed 
    Allah, may He be exalted, is more glorious and greater than all of that. The 
    fact that you are distracted by these imagined images is the result of 
    whispers and temptation from the Shaytaan, so that he can distract you with 
    that which is harmful to you from that which would benefit you, and distract 
    you with falsehood from the truth. Imam at-Tahhaawi (may Allah have mercy on 
    him) said in his book al-‘Aqeedah: 

    One’s commitment to Islam cannot be steadfast except on the basis of 
    surrender and submission. So whoever seeks to know about that of which 
    knowledge is kept away from him, and he is not content to submit to Allah, 
    then his efforts (to know that which he has been prevented from knowing) 
    will hinder him from attaining pure Tawheed, proper knowledge and sound 
    faith. So you will see him wavering between belief and disbelief, accepting 
    and rejecting, confirming and denying, controlled by insinuating thoughts, 
    lost in his wandering, full of doubt, neither believing and affirming nor 
    denying and disbelieving.

     The Prophet (blessings and peace of Allah be upon him) has taught us a way 
    of warding off the waswaas (whispers) that the Shaytaan throws into a 
    person’s heart that have to do with Allah, may He be glorified and exalted, 
    as he said: “The Shaytaan may come to one of you and say: Who created such 
    and such? Until he says to him: Who created your Lord? If it goes that far, 
    let him seek refuge with Allah and stop (such thoughts).”

    Narrated by al-Bukhaari (3276) and Muslim (134). 

    An-Nawawi (may Allah have mercy on him) said:

    What this means is: if this waswaas comes to him, let him turn to Allah, may 
    He be exalted, to ward off its evil from him, and let him turn away from 
    thinking about that; he should understand that this passing thought comes 
    from the whispers of the Shaytaan, and he is only trying to corrupt him and 
    misguide him. So let him avoid listening to his whispers and let him hasten 
    to cut them off by focusing on something else. And Allah knows best. 

    For more useful information, please see Fataawa ash-Shaykh Ibn ‘Uthaymeen 
    (1/question no. 18) 
As 
    for the closeness to Allah that you are looking for and seeking in your 
    worship of your Lord, may He be glorified and exalted, the best status of 
    those who worship Allah is: 

    “To worship Allah as if you see Him, for if you do not see Him, He sees 
    you.” 

    But this great and noble status does not require you to exert yourself and 
    distract your focus by seeking something that you can never attain, which is 
    to imagine the form of Allah, may He be glorified and exalted. Rather it 
    requires you to bring to mind those attributes that Allah, may He be 
    glorified and exalted, has of majesty, perfection and beauty that will help 
    you to focus your heart on worshipping Him, may He be glorified, and turn to 
    Him with all your being. Al-Haafiz Ibn Rajab (may Allah have mercy on him) 
    said:

    The words of the Prophet (blessings and peace of Allah be upon him), 
    explaining what is meant by ihsaan, “to worship Allah as if you see Him” 
    indicate that the slaves should worship Allah in this manner, which is 
    trying to feel His closeness and that He is before him. This requires one to 
    be filled with fear, awe and veneration, as it says in the report narrated 
    by Abu Hurayrah: “to fear Allah as if you see Him.” [This version was 
    narrated by Muslim (101)]. 

    That will also lead to being sincere in worship and striving one’s utmost to 
    improve it and perfect it.

    Jaami‘ al-‘Uloom wa’l-Hukam 
    (1/104) 

    Ibn al-Qayyim (may Allah have mercy on him) said: The status of ihsaan is 
    the basis for all deeds of the heart, for it leads to feeling shy (before 
    Allah), awe, veneration, fear, love, turning to Allah, may He be glorified, 
    putting one’s trust in Him, beseeching Him, humbling oneself before Him, 
    cutting off all insinuating thoughts and self-talk, and focusing the heart 
    and mind on Allah. 

    The individual’s level of closeness to Allah will be commensurate with his 
    level of ihsaan. On that basis, prayers may vary in quality, to the extent 
    that the difference between the prayers of two men may be like the 
    difference between heaven and earth, even though their standing, bowing and 
    prostrating may be the same. 

    Risaalah Ibn al-Qayyim ila Ahad Ikhwaanihi 
    (p. 38, 39). See also: Jaami‘ al-‘Uloom wa’l-Hikam by Ibn Rajab 
    (1/103ff), Dar Ibn al-Jawzi edn; Ma‘aarij al-Qubool by Shaykh Haafiz 
    al-Hikami (3/999, 1000). 

    The scholars pointed out a number of actions and beliefs which, if a person 
    strives to attain and understand them, that will help him to draw closer to 
    his Lord, may He be glorified and exalted, and the more a person strives to 
    be closer to his Lord, may He be glorified and exalted, the closer Allah, 
    may He be exalted, will be to him. So do as little or as much as you want. 

    These things include the following: 

    1.Attaining true 
    understanding of the Oneness of Allah (Tawheed) and avoiding both major and 
    minor shirk (attributing partners to Allah)

    Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: 

    This is attaining true sincerity and Tawheed which, whoever attains them 
    will be the closest of all people to Allah. That is attaining the word of 
    true devotion, Laa ilaaha ill-Allah (there is no god but Allah). 

    Al-Istiqaamah 
    (p. 195) 

    2.Knowing the 
    attributes, names and actions of Allah, may He be exalted.

    Ibn al-Qayyim (may Allah have mercy on him) said: 

    The status of ihsaan, which is the state of being aware that Allah is always 
    watching, means worshipping Allah as if you can see Him. This status can 
    only stem from perfect belief in Allah and His names and attributes, to the 
    extent that it is as if you can see Allah, may He be glorified, above His 
    heavens, risen above His Throne, issuing His commands and prohibitions, and 
    controlling the affairs of creation. So the command descends from Him and 
    ascends to Him, people’s deeds and souls are shown to Him when they return 
    to Him (at death). So he witnesses all of that in his heart, and he 
    witnesses His names and attributes, and he witnesses One Who is 
    Self-Sustaining and All-Sustaining, Ever-Living, All-Hearing, All-Seeing, 
    Almighty, Most Wise, Who issues commands and prohibitions, Who loves and 
    hates, Who is pleased and is angry, Who does whatever He will and rules 
    however He will; He is above His Throne and nothing is concealed from him of 
    people’s actions, words or innermost thoughts. Rather He knows the fraud of 
    the eyes, and all that the hearts conceal (cf. 40:19). 

    3.Becoming a true 
    close friend (wali, pl. awliya’) of Allah, which is attained through faith 
    and piety, as Allah, may He be glorified and exalted, says (interpretation 
    of the meaning):

    “No doubt! 
    Verily, the Awliya of Allah (i.e. those who believe in the Oneness of Allah 
    and fear Allah much (abstain from all kinds of sins and evil deeds which he 
    has forbidden), and love Allah much (perform all kinds of good deeds which 
    He has ordained)), no fear shall come upon them nor shall they grieve, -

    Those who believed (in the Oneness of Allah - Islamic 
    Monotheism), and used to fear Allah much (by abstaining from evil deeds and 
    sins and by doing righteous deeds)”

    [Yoonus 10:62, 62]. 

    Ibn al-Qayyim (may Allah have mercy on him) said: Wilaayah (being a close 
    friend of Allah) means being close to Allah, may He be glorified and 
    exalted. The wali of Allah is the one who is close to Him. 
    

    Badaa’i‘ al-Fawaa’id 
    (3/621) 

    4.Persisting in 
    prayer, especially bearing in mind that one is close to Allah, may He be 
    exalted, when prostrating, for that is the closest that a person may be to 
    his Lord, may He be exalted; and also praying at the end of the night.

    Allah, may He be exalted, says (interpretation of the meaning): 
    “Fall 
    prostrate and draw near to Allah!” 
    [al-‘Alaq 96:19]. 
It 
    was narrated from Abu Hurayrah that the Messenger of Allah (blessings and 
    peace of Allah be upon him) said: “The closest that a person is to his Lord 
    is when he is prostrating, so say a great deal of du‘aa’.”

    Narrated by Muslim (482) 
It 
    was narrated from ‘Amr ibn ‘Abasah that he heard the Prophet (blessings and 
    peace of Allah be upon him) say: “The closest that a person is to his Lord 
    is in the depths of the latter part of the night, so if you can be among 
    those who remember Allah at that time, then do so.”

    Narrated by at-Tirmidhi (3579) and an-Nasaa’i (572); classed as saheeh by 
    al-Albaani in Saheeh al-Jaami‘ (1173). 

    5.Truly repenting 
    from sins, minor and major

    Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: It should 
    be understood that repentance is essential for every believer, and no one 
    can attain perfect closeness to Allah and rid himself of everything that He 
    dislikes except by means of it.

    Majmoo‘ al-Fataawa 
    (15/55) 

    6.Remembering Allah, 
    may He be exalted, at all times, reciting adhkaar, du‘aa’s, tasbeeh, tahmeed 
    and tahleel
[adhkaar 
    = phrases of remembrance of Allah; du‘aas = supplications; tasbeeh = 
    reciting the phrase Subhaan Allah (glory be to Allah); tahmeed = 
    reciting Al-hamdu Lillah (Praise be to Allah); tahleel = reciting 
    Laa ilaaha ill-Allah (There is no god but Allah)] 

    Ibn al-Qayyim (may Allah have mercy on him) said: Dhikr brings one closer to 
    Allah, may He be glorified and exalted, which is a status that everyone 
    should strive for.

    Al-Waabil as-Sayyib 
    (1/96) 

    7.Attaining true 
    fear of Him, may He be glorified and exalted.

    Ibn al-Qayyim (may Allah have mercy on him) said: 

    The level of fear of Allah is commensurate with one’s level of closeness to 
    Him and one’s status before Him. The closer a person is to Allah, the 
    greater his fear of Him will be, because there is required of him what is 
    not required of others, and he has a duty to take care of that status and 
    give it its due in a manner that is not expected of others. That is similar 
    to the one who is present before one of the kings, and can see that king: he 
    is more fearful of him than one who is far away from him, and his fear will 
    be according to how close he is to the king and his status with him, and how 
    much he knows about the king and his rights. That is also because there is 
    required of him, in terms of serving the king, what is not required of 
    others. So he is more expected to fear the king than one who is far away. 
    Whoever understands this properly will understand the hadith in which the 
    Prophet (blessings and peace of Allah be upon him) said: “I am the most 
    knowledgeable of Allah among you and I am the one who fears Him the most 
    among you.” 

    Tareeq al-Hijratayn 
    (1/427, 428)  

    And Allah knows best.