Hope and Fear in Islam
Question

Allah says in the Hadith Qudsi: “I am as My slave thinks I am, so let him think of Me whatever he wishes.” And that there is something that ‘Umar ibn Al-Khattab (may Allah be pleased with him) said: “If one of my feet was in Paradise and the other was outside of it, I would not feel safe from the plan of Allah.” 
Was ‘Umar (may Allah be pleased with him) not thinking positively of Allah, when he was one of those who were given the glad tidings of Paradise, and he was the second greatest of the Companions of the Prophet after Abu Bakr (may Allah be pleased with him)? Is it possible that a person could feel assured, yet also fear the plan of Allah? I hope that you can explain clearly what the connection is between ‘Umar’s words and the hadith.
Praise be to Allah.Thinking positively of Allah 
Al-Bukhari (7405) and Muslim (2675) narrated that Abu Hurayrah (may Allah be pleased with him) said: The Prophet (blessings and peace of Allah be upon him) said: “Allah, may He be exalted, says: I am as My slave thinks I am.”
The Hadith in the version mentioned in the question was narrated by Imam Ahmad (16016) and others, from Sulayman ibn Abu As-Sa’ib who said: Hayyan Abu An-Nadr told me: Wathilah ibn Al-Asqa‘ (may Allah be pleased with him) and I went to visit Abu Al-Aswad Al-Jurashi during his final illness. He greeted him with Salam and sat down, and Abu Al-Aswad took hold of Wathilah’s right hand and wiped over his eyes and face with it, because he had sworn allegiance with it to the Messenger of Allah (blessings and peace of Allah be upon him). Then Wathilah (may Allah be pleased with him) said to him: I want to ask you one thing. He said: What is it? He said: What do you think of your Lord? Abu Al-Aswad nodded – meaning that he thought well of Him. Wathilah said: Be of good cheer, for I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: “Allah, may He be Glorified and Exalted, says: I am as My slave thinks I am, so let him think of Me whatever he wishes.”
The commentators on Al-Musnad said: “Its chain of narrators is authentic. It was classed as authentic by Al-Albani in Sahih Al-Jami’.”
An-Nawawi (may Allah have mercy on him) said:                 
The scholars said: What is meant by thinking positively of Allah is thinking that He will show him mercy and pardon him. They said: When a person is in good health, he should have hope and fear in equal measure. It was also said that the level of fear should be greater , but when the signs of impending death appear, he should increase his hope, or only have hope, because the purpose of fear is to make a person restrain himself from committing sins and abhorrent deeds, and make him keen to do a great deal of acts of worship and righteous deeds , but it may not be possible to do that or do most of it in this state, so it is recommended to think positively of Allah, as well as showing humility and submission to Allah, may He be Exalted." (Sharh An-Nawawi ‘Ala Muslim  17/210)
Imam Ahmad (9076) narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Allah, may He be Glorified and Exalted, says: ‘I am as My slave thinks I am. If he thinks positively of Me, that will be good for him, and if he thinks negatively of Me, that will be bad for him.”
It was classed as authentic by the commentators on Al-Musnad.
Al-Munawi (may Allah have mercy on him) said:
That is: if he thinks positively of Me, he will find good consequences, and if he thinks negatively of Me, he will find bad consequences.”" (Fayd Al-Qadir 2/312)
So the Muslim must think positively of his Lord, by striving to do good and turning to Allah, and if he does something bad, he should think positively of Allah by repenting without delay and hoping that Allah will forgive him and pardon him.
Do not to feel safe from the plan of Allah 
Allah, may He be exalted, says (interpretation of the meaning):
{Then did they feel secure from the plan of Allah? But no one feels secure from the plan of Allah except the losing people} [Al-A`raf 7:99].
Shaykh Ibn Baz (may Allah have mercy on him) said:
What is meant here is a warning to people not to feel safe from the plan of Allah by continuing to disobey Him and neglect His rights. What is meant by Allah’s plan for them is His letting them get carried away and granting them more delights and good things whilst they continue to disobey Him and go against His commands. Thus they deserve to be brought to account for their heedlessness and punished for their negligence, because they continued to disobey Him and felt safe from His punishment and wrath." (Majmu‘ Fatawa Ibn Baz  24/232)
He (may Allah be pleased with him) also said:
What is required of the Muslim is not to despair of mercy and not to feel safe from punishment; rather he should be in a state between hope and fear, because Allah has condemned those who feel safe from punishment and has condemned those who despair of His mercy, as He, may He be Glorified, says (interpretation of the meaning):
{Then did they feel secure from the plan of Allah? But no one feels secure from the plan of Allah except the losing people} [Al-A`raf 7:99]
{do not despair of the mercy of Allah.} [Az-Zumar 39:53]
Therefore, the accountable person, male or female, must not despair or give up or not stop striving; rather he must be in a state between hope and fear, fearing Allah and avoiding sin, hastening to repent and ask Allah for pardon, and he should not feel secure from the plan of Allah and persist in sin and heedlessness."(Fatawa Nur ‘Ala Ad-Darb by Ibn Baz 4/38).
Ibn Kathir (may Allah have mercy on him) said:
“Hence Al-Hasan Al-Basri (may Allah have mercy on him) said: The believer strives to do acts of worship and righteous deeds when he is concerned, worried and afraid, whereas the evildoer commits sins yet still feels safe from the punishment of Allah." (Tafsir Ibn Kathir  3/451)
The believer does not feel safe from the plan of Allah until he enters Paradise 
With regard to what some people narrate from Abu Bakr (may Allah be pleased with him) – and others narrate from `Umar (may Allah be pleased with him) – that he said: “If one of my feet was in Paradise and the other was outside of it, I would not feel safe from the plan of Allah”, we could not find any source for it in books of the scholars of Hadith, and we do not know any of the scholars who mentioned it.
Shaykh Al-Albani (may Allah have mercy on him) was asked about it and he said:
“I am not familiar with it.”
These words – after establishing that they are not soundly narrated – are subject to further discussion. The believer does not feel safe from the plan of Allah so long as he has not entered Paradise, then once his feet step into Paradise, he will be safe from the plan of Allah. It is not known that anyone would step with one of his feet into Paradise, then Allah would take him out of it and admit him to Hell.
Imam Ahmad (may Allah have mercy on him) was asked:
When will a person feel secure and at ease?
He said: “With the first step he takes into Paradise." (Tabaqat Al-Hanabilah 1/293)
And Allah knows best.