I just saw this nice TED Talk by Uri Alon about how new scientific insights are generated. Even though the talk is a year old I think it's worth posting, so here you go.
Uri makes a number of points that I've been aware of for a long time but have never seen expressed quite so clearly:
Discovery is not linear. We usually don't obtain the result we were aiming for. However, as we try, we make worthwhile discoveries that constitute the real scientific progress.
It is not helpful to shoot down ideas before you've even tried them. Statements like "this is never going to work" "this is too complicated" "X, Y, and Z are going to go wrong" "nobody will believe me anyway" are all not useful. Accept the crazy ideas, try them out, and see what happens. Say "yes and ..."
Being worried about your research shuts down your creativity. Try to be more relaxed, even if things don't go the way you think they should. Don't try to obtain a particular goal, focus more on exploring the unknown.
When things don't go well, talk to other people, look for support. Science can be hard on your mental well being, and to keep going sometimes you just need people to cheer you on.