Yep, let's think about this for a second...
Humans are real. - True. Well, you could argue that people you meet from time to time are just products of your sick imagination (25% internet for the one that gets the reference) but let's say it's true, because we can't check that.
Reality is real. - True and tauthology. You could do the same as with people, but that doesn't get you anywhere, except into the Matrix, of course.
Human ignorance is real, exists and is practically endless. - True. The more you know about something, you never know enough. Thus, by exploration, human knowledge grows!
Fear of death is real. - Well duh! Everything that lives, dies. Everything that dies, fears death (sooner or later).
Now, let's define god. What is god? The answer to questions.
You have pumped version of yourself (because I as myself is the only thing you can be "sure" really exists) that explains reality and gives you answers you don't have, effectively filling holes in your knowledge. Especially holes in "what happens after death" knowledge, thus getting your fear down.
There. Explanation how did mankind come to imagine God.