It's probably the most difficult thing in the world to do, and yet so few stories talk about it. But how many people do you know that have good lives and yet are miserable anyway? Tomoya's story is their own, that of the person who has something in their life that makes the rest of it seem unbearable, no matter how small it may appear to the outsider. But the outsider's opinion really isn't what matters, is it? You have your issue, and until someone takes it seriously it's not going to be resolved. Clannad is about Tomoya's attempts to change his life so he can finally accept the love of those around him. And the world/God is willing to do everything it takes to help him do this, even rewind time itself when Tomoya finally realizes that he won't regret being with Nagisa.
See, the reason why Tomoya got his rewind was because he had a wish, and refused to use it. The episode where Nagisa dies is where Tomoya's real issue with life comes out.
Bad things happen to good people, and some people can barely take that. Tomoya happens to be one of those people.
Fortunately, however, Ushio gives him the opportunity to use his wish again, and Tomoya FINALLY makes the decision to bring Nagisa back, but at the cost of losing his internal bitterness that bad things have to happen for good things to flourish all the more in this world. This isn't some cliche "you have to do bad things for good reasons" bullcrap, but the legitimate knowledge that bad things that happen to you can lead to even better things in the future. It's a message that's extremely hopeful and, ultimately, really touches on what all good stories are about: good prevails, even if it takes a little bit of time to get there. As the Count of Monte Cristo says "Wait and hope"...