Tons of good advice so far, so I'll just speak to the mental aspect of riding 100 miles. I can't speak for everyone else, but I occasionally have moments of struggle during long/hard rides/events. I refer to the low-part of the ride as the "crux," and it usually involves a feeling that I want nothing more than to end that activity. It's usually brought on by physical fatigue, but is mostly mental in nature IMO.
Obviously don't ignore signs that are pointing to a potential medical emergency, but if you find yourself in that struggle, remind yourself that it's only a temporary situation. When I'm at one of those low points, I just tell myself that in the grand scheme of life, those points are just mere hours or even just minutes of discomfort. Without getting too philosophical, I'll then move onto a thought about how I'm experiencing something that the average Joe doesn't get to experience...also that nothing worth doing, is easy. With this positive thinking, I'm almost always able to make a mid-ride recovery.
My final tip, is to "break" the ride up in your mine...not necessarily for any logistical purpose, but just to have small objectives you can accomplish during the ride. On a flattish century, maybe that's breaking it up into quarters...in a local mountainous century, I broke the ride up into mountain passes climbed.