Currently epistemologists disagree whether they are necessary AND sufficient, but most would agree that three necessary conditions for a subject s to know some proposition "p" are 1) that "p" be true, 2) that s be justified in believing "p," and finally 3) that s believe "p." If these three conditions are in fact necessary to know something, then you are effectively asking whether one ought to believe what one does not believe and has no reason to believe. Epistemologists would typically answer "no" as saying "a subject s ought to believe 'p'" is typically taken to be equivalent to "a subject s has ground for believing 'p,' and very little, if any, ground to believe '~p'."
I've heard, however, that repeating encouragement to oneself may have a beneficial outcome in certain situations. Whether one actually believes what they tell themselves, I think comes down to a case by case basis. Whether they ought to believe what they tell themselves however, I think, is a deeper question that would be further clarified by analyzing what we mean by "ought" and "believe," and establishing when we understand a subject to be justified in believing a particular proposition.
Your question is an interesting one and is definitely discussed among philosophers. I would suggest reading The Problem of Knowledge by A.J. Ayer and "Is Justified True Belief Knowledge" by Edmund Gettier as a general introduction to 20th century epistemology and then move on to works by Wilfrid Sellars Laurence Bonjour, Earl Conee, Richard Feldman, Hilary Kornblith, William Alston, W.V. Quine, et al.