We need to learn the art of changing our defeat into triumph. Let me explain it in a bit different way.

We should prepare ourselves very well in advance before taking the interview. If due to some reasons things didn't turn our way, we should better think in a positive way.

You may talk to yourself like this -

1) hey.. leave that.. this was not the right job for me. Some better job opportunity is still waiting for me. This was one step toward that direction and was meant to prepare me better.

2) Well, I did well but it is they (some perspective employer) who could not recognize the talent in me. So it is they who are the losers. I am going to create a win-win situation for the employer who is going to hire me :-)

Hope.. all this is not too optimistic.. but it works.. what;s wrong in trying it :-)