It was a fortunate coincidence that as I have been gaining more insight into the (unconscious) role of magic in my life, I happened to see the following:
... The traditional psychoanalytic view has emphasized the negative aspects of grandiosity and omnipotence, seeing them in terms of the gratification of infantile and regressive wishes. From this perspective, grandiose states are seen as manic defenses, magical denials of anxiety and aggression, and as an avoidance of reality. Self psychologists and some object relations theorists have presented a more positive view of grandiosity. Kohut (1977) suggests that if the child does not find an admiring other for his early grandiose and exhibitionist performances, then he/she will develop an extremely fragile self structure focused on action that attempts to maintain cohesiveness through archaic self-object relations. Balint (1968), Klein (1975b), Kohut (1984), Winnicott (1971), and others view grandiose, omnipotent, and magical behavior as crucial aspects in the development of positive and hopeful aspects of psychic reality, without which intimate relationships and the development of subjectivity would be impossible. ... Winnicott believes that the development of omnipotence, which grows out of the child being joined in illusory, magical, and surreal transitional experience, is the precursor to the development of the true or subjective self and the capacity for creativity and for artistic, religious, and intimate experiences.
... Freud's highly critical view of grandiosity is clear in the following comment:
... our observations and views on the mental life of children and primitive peoples. In the latter we find characteristics which if they occurred singly, might be put down to megalomania: an overestimation of the power of their wishes and mental acts, ``the omnipotence of thoughts,'' a belief in the thaumaturge (that is, miraculous) force of words, and a technique for dealing with the external world---magic---which appears to be a logical application of these grandiose premises. [p.75]From Freud's psychoanalytic perspective, my patient's grandiose state and his subsequent sense of despair would be seen as the inevitable failure of his grandiose defense, of his primitive, childlike belief in the omnipotence of his thoughts and words with which he tried to avoid awareness of his limitations as well as the importance of the reality principle. His intense feelings of despair, emptiness, and deadness would not be seen as an independent psychological event, but rather as the result of the failure of his grandiose defenses and the emergence of recognition that he cannot be the oedipal victor. His experience of himself as an empty suit, a haircut, would represent his difficult in feeling that he can fill an adult role as well as an intense castration anxiety in relation to social authority. ---pp. 58-60, Between Emotion and Cognition