I don't really think of Bridge to Terabithia as a variant along these lines, because I remember the ending being that the magic/imagination is real and worth all the pain, not that whatshername died because she believed in her imagination. That's why it ends with the boy taking his sister to Terabithia.
I had also thought the others ones were using Magic as a metaphor for the belief that people were mostly basically decent, which only innocent kids would believe and they needed to wisen up and realize that everyone was a jerk and the whole world mostly sucks. Which is different from the way real fantasy books are sort of a metaphor for the idea that Dragons in life exist but you (maybe with the help of your friends and also common decency) can struggle against them.
no subject
I had also thought the others ones were using Magic as a metaphor for the belief that people were mostly basically decent, which only innocent kids would believe and they needed to wisen up and realize that everyone was a jerk and the whole world mostly sucks. Which is different from the way real fantasy books are sort of a metaphor for the idea that Dragons in life exist but you (maybe with the help of your friends and also common decency) can struggle against them.