Some children seem to be born more pessimistic than others, but optimism can also be systematically taught. And a child with a higher degree of optimism is more likely to resist depression, be health physically, persist at difficult tasks, and succeed in school and later life. In fact, children with high 'optimism' scales are more likely to outperform in college what their SAT and achievement scores would predict.
The picture below shows that students with higher anxiety scores are more likely to have lower levels of amygdala activation when viewing photographs of 'happy faces.' Of interest too, the higher anxiety subjects were still within normal ranges of personality.
Gifted children may also especially prone to existential depression, and studies of gifted children have shown that gifted students may react more intensely than average-ability students to frustration. Studies of stress and burn-out in gifted students suggest that key factors can be an inappropriate level of intellectual stimulation ('underload' or 'overload' as Hoekman et al. have recently commented).
One helpful book offering a step-by-step program to improve a child's optimism is Dr. Seligman's The Optimistic Child. It provides practical instruction on how to encourage children to see failures and setbacks as temporary, limited, and impersonal.
Seligman's Optimism Program
Happy Faces fMRI
Hoekman, McCormick, Barnett, 2005. The Important Role of Optimism in a Motivational Investigation of the Education of Gifted Adolescents, Gifted Child Quarterly, Spring 2005 (not online).