Creativity is about a mode of thought relatively cut-off from the environment: it is about inner thought.
Thus creativity implies a disengagement from sensory input (e.g. detached from visual and auditory stimuli), and from engagement with the immediate surrounding environment, including the social environment.
But, to be inner-directed is not sufficient to define creativity; for example, sleep, psychosis and delirium are all states in which attention is directed to inner stimuli - yet these are not creative.
When there is no control over the direction of thought - as in dreams, or in hallucinatory and thought-disordered states - there is no purposive control. Thought is being passively-driven-by the inner world.
Creativity entails that the direction, the subject matter, of thought be voluntarily directed; directed towards something like understanding a circumstance, solving a problem, or making a thing.
Creative inspiration is therefore IN-spiration - comes from inner reflection; but to be truly creative inspiration is sought, it is strategic, it is a product of motivation.
So, there is a type of inner-directed thought which is deranged, and may be pathological (for example induced by drugs).
But, the inner-directed thought of a creative person is a result of the way he is made - the inward-attending-bias of creativity is 'hard-wired', innate, present from young childhood.
The creative person is made so that his attention and interest tends to be relatively cut off from the environment, relatively uninterested in the social world (which - in most people - commands most of their interest) .
And indeed, because he is made with an inward bias - if or when a creative person suffers some mental impairment, he is more-than-usually-likely to become psychotic.
But it is not the psychosis which gives the creativity; rather the creativity and the prone-ness to psychosis have the same basis - presumably the same nature of inner-directed hard-wiring.