If you're walking alone, it sometimes helps to count, over and over. Counting focuses you on each step, and helps you avoid seeing the distance you have to go as insurmountable. If you're walking with others, save good stories for long climbs, rainy days, and other difficult times. After hiking about 1000 miles, I hooked up with a buddy, and her good humor, flexible attitude, and storytelling ability made the miles fly by. At times, one of us would think of a good story, but we'd save it for the hard times.
Stories weigh nothing, but they can make a heavy pack seem much lighter.
If it's really bad, or you think you're getting physically ill, treat yourself to a clean motel room. Take vitamins throughout the trek. I did feel watched-over, helped, and guided on the trail, and when I was having a really hard time, help would appear in the form of a kind stranger, animal, or dream. If you eventually make the decision to leave the trail, then you'll know you did it with a calm head and clear heart. There is a time on every trek when the thrill wears off and the daily long walk, with its hardships, becomes burdensome and depressing.