Try fantasy. The word can be used to describe an unrealistic or improbable desire.
Merriam-Webster, definition 5:
the power or process of creating especially unrealistic or improbable mental images in response to psychological need
In your examples, the beliefs are unrealistic and can be supposed to come from some psychological need (a wish, a desire, a need for optimism).
Relevant synonyms include delusion (which has a stronger sense of false belief) and pipe dream (which is closer in meaning and often refers to plans).