When my first company (learnection) failed, I took it pretty hard. In fact, I took it really hard. It was the first time I had failed at something big.
The closest thing previously was probably a B+ I got in statistical mechanics in college, but it was hard to get more than annoyed about that one given that I was hardly paying attention. That class was in my last semester and my mind had already moved on from Physics into a brief stint with apathy and then onto startups.
I had hired five of my friends to work with me, and even convinced one (and his girlfriend at the time) to move up to Boston after college (from North Carolina). When the money ran out a year later, they all moved on and the company was as good as dead.
That was the point when the failure really hit me for the first time. I'm a very optimistic person, but for a few weeks there I was very unhappy. The company didn't end though. I let it linger via my nights and weekends for another year and half or so, while I essentially dwelled on the past.
Continuing to think about it and tinker with it was certainly preventing me from moving forward onto bigger and better things. It was essentially a complete waste of time.
I had trouble letting go. And then one day everything changed. It wasn't an explicit decision I can remember, but more of a shift in state of mind. If anything, the trigger may have been moving my server and losing some of the files such that I couldn't easily get the learnection code running again.
In any case, I no longer dwelled on the past. Since then I've failed a lot of times to really no bother.
It's not that I don't care about my projects. Quite the opposite. If you don't care, I think your probability of success is minimal.
Instead, I think that I am able to separate my identity from my work. Perhaps it is a defense mechanism at its core.
I feel it is more enlightening though. I also think that's why my parents seem to take these failures harder than me--they wrap my identity into the projects even though I do not.
I don't try to forget about the failures. Nor do I feed upon them. There is actually no explicit process. When appropriate, I move on. I draw on past experiences when relevant, but otherwise I just don't dwell on the past. It's that simple.
For startups in particular, I view failure as a natural process in a startup career path. If you're serious about startups, you're most likely going to fail many times. Promising features will die. Products within your startups will flounder. And whole startups will die. That's the life you're choosing.
Update: some good comments on HN.