"How can we reliably distinguish between what theists call God and something that is merely imaginary?"
The trouble with questions like this is that they attempt to prove something that is by its nature unprovable.
If you wanted to be cynical it would be easy to look at a prayer meeting and see a bunch of nutjobs who are sitting in a circle talking to someone that anybody can clearly see is not there. Maybe they do it for emotional support, maybe it's just an act of defiance against a world that is utterly uncaring. Or maybe there is something in it after all.
The statement "God exists" is a statement of faith. What many atheists don't want to accept is that the statement "God does not exist" is just as much a statement of faith. Those willing to accept that they don't know whether or not God exists are arguably the only ones who can never face a burden of proof.
Many times atheists will insist that the claim "God exists" comes with a burden of proof while refusing to accept that "God does not exist" carries a similar burden of proof. A logical neutral position is neither of these two, but an acceptance that we do not know whether God exists, regardless of whether or not we are taking any steps to answer the question.
To take a silly comparison, let's look at whether unicorns exist. We may spend some of our childhood believing in unicorns and fairies and dragons and monsters and such things, and gradually come to conclude they do not actually exist. It's harmless for a 4-year-old to think of princesses and dragons and knights riding unicorns and the like but if a 24-year-old still believed in such things we would consider them to be somewhat unhinged. So what changed? In this regard the burden of proof is asymmetric - to prove that unicorns exist one need only demonstrate the existence of a single unicorn while to prove that unicorns do not exist is virtually impossible. So we form an opinion based on our experience, and need to be ready to reassess our opinion if our experience changes in a manner that warrants it. I do not believe that unicorns exist (to be more specific, I believe that unicorns do not exist) but, should I ever encounter a unicorn, I would need to reconsider my worldview. If I were to hear about a unicorn encounter I would need to consider the credibility of the account, which would encompass things like how many people saw it, how close it was, what (if any) evidence exists to support their claims, whether I believe the witnesses, and so on.
Where the existence of God is concerned, we cannot conclusively prove the existence of God any more than the atheist can conclusively prove the non-existence of God. So in the absence of conclusive proof we need to consider two questions. The first is whether the existence or otherwise of God is relevant to our lives. The second is whether, based on what we can experience, we should consider the existence of God, or the non-existence of God, to be more believable.
I think Pascal's wager suggests that the question of whether or not God exists is of great importance to our lives. Although Pascal's wager is a huge oversimplification of the decision we must make (not least because if we back one deity and find we should have backed another we potentially end up no further forward), it does demonstrate the significance of eternity when compared to our brief three-score-years-and-ten on this earth.
The next question is whether the first four words of Scripture, "In the beginning God" are accurate or whether it would be more accurate to say "In the beginning not-God". In other words, whatever the nature of god, is it true to say that it existed before time and is outside of time. I'm using a small g intentionally because now I'm shifting to use "god" as a generic term for one or more eternal beings, whatever their nature.
The worldview that includes a god as a creator makes sense. Some being or beings that are eternal created the world and the universe as we know it, and everything else falls into place. Whether you want to believe in a literal six-day creation, in theistic evolution, in gap theories, in old earth creation, it all falls into place.
The worldview that excludes god is simply absurd, when considered rationally. If we see a paper cup blowing down the street we figure a person or machine must have made it. Then we go up the chain and that person had a parent, or the machine had a creator. To follow up the chain seeing things being created by more-complex things until we end up with a life form that reproduces itself, and insist that the ultimate creator of all of this is nothing more than a cosmic fluke and a billion years of accidents, makes no sense at all. I'd go as far as to say such a belief is irrational, even absurd. If we exclude god we end up with chains that can't be explained and multiple attempts at passing the buck. We can't explain evolution beyond the most basic notions of adaptation (sometimes called micro-evolution), yet we insist that something as complex as a human evolved from an amoeba. Because we can't explain how the first living thing came to be we pass the buck to another theory, namely that of abiogenesis. Sadly we can't explain how a bunch of proteins went from being a puddle of chemical goop to being a living thing so we can't explain that step either. And even if we could, we need to explain how the puddle of chemical goop got to be there in the first place, and ultimately end up with the theory that nothing interacted with nothing to explode and make everything.
On balance I would suggest that belief in some form of deity is a far more rational explanation than belief in a billion years of flukes.