Artax perishes in the Swamp of Sadness due to a combination of factors. The swamp's depressive energy saps his will and strength. Also, it symbolizes the harsh realities and challenges the characters face in the story.
The Neverending Story has elements of sadness, like when characters face difficult challenges or part ways. But it also has hope and adventure mixed in.