Thank you for your nice question. We normally think of our beliefs as things that ought to be responsive to evidence, and only to evidence. So for instance, most of us would agree that it is not a proper reason for thinking that smoking is not harmful to my health, that it makes me feel better to think so. Rather, most people would probably criticize me for thinking something on the basis of what I want to be true rather than in light of how the world is. Again, we would probably criticize an adult (though perhaps not a child) for believing in the Tooth Fairy, if his or her reason for so believing was that doing so makes her feel better. After all, wishing something to be so doesn't usually make it so. (Possible exceptions to this rule have to do with our own behavior: wishing to go outside to enjoy the weather might induce me to go outside to enjoy the weather, but this sort of case seems far removed from the topic of your question.)
So wishful thinking seems to be what some philosophers might call an "epistemic failure"--a failure to use our minds properly in aid of finding out how the world is.
You might reply: Well, in the case of faith, doesn't such "wishful thinking" stand a chance of making our lives better? For instance, doesn't believing in God give our lives meaning and give us direction for how to act?
To this many epistemologists might reply: Even if it's in your best interest to believe something, this fact doesn't increase the chances that it is true. On the other hand, this practical argument for theism might show that it's in one's best interest to be a theist. But to do this, it will have to make a lot of assumptions about people. For instance, it will have to assume that being a theist is the only way, or the only feasible way, to achieve the comfort in question (such as giving our lives meaning, and so on). But that is a heavy assumption, and might make one wonder whether there might be another way of achieving this comfort (such as re-thinking the assumption that our lives have to have meaning) without buying the theism.
As you think through these issues, you might also consider how your question relates to Pascal's Wager.