Unfortunately, it is inevitable that during a PhD things will go wrong. Sometimes they go wrong quite badly, and time will tick by with little or nothing to show for it. I know, I've been there. It's all well and good saying 'make sure you have a good support network' or to say to seek the counsel of a good friend, but such advice is not hugely practical, and some people don't have those away from work to turn to. So, what can you do that is practical to lift yourself (and your project) out of the PhD blues?
1. Ask lots of questions, set targets
I don't mean soul-searching, should-I-throw-in-the-towel kinds of questions, but questions that incrementally lead you towards the story you are trying to tell with your project. If you've lost enthusiasm with your experiments, set out a question that you can realistically answer for every day of the next week.
For example, today I might ask: does this gene interact with this gene? I'd test this using the assay I've been working with, but never with these two genes, so lets see what happens. And tomorrow I might ask: what happens when I combine these two substances? All are small questions that will need answering along the way, pushing the project forward, so I will get there, bit by bit.
2. Stay flexible
That said, be realistic. There is no point asking a question or setting a target that is unrealistic and too rigid. Things have gone wrong in the past, and they're going wrong right now, so don't fixate yourself on one target and one outcome, because if you fail to reach it it will crush you even further. Accept that the targets you set are for the purpose of progressing, they're not an absolute. In general you ought always to be flexible. When things go wrong, accept defeat and try something else. it is all too easy to stay stuck on one failing experiment for too long - go, be a scientist: explore!
3. Keep in regular contact with your supervisor
A supervisor isn't your boss. Your science is their science too, so really a supervisor is your part-boss, part-mentor, part-teacher, part-friend and, crucially, your collaborator, all wrapped up into one overly-busy bundle. The following advice is utterly simple, and yet something so easily forgotten or shied away from: when things go wrong, talk to them. They want you to do well too, because your results go on their papers; and their names go on yours. A good supervisor might not know why what you are doing isn't working, but they'll be much more able to take a step back from it and find a new direction to try. Remember: they have been in your shoes. They know how hard it can be.
But how to stay motivated?
4. What you are doing is important
For me, it helps to remember that what I am doing is important and, crucially, novel. Nobody has ever done it before. That's what makes it hard, but it's what makes it so interesting and rewarding too. Think: you are the only person to have ever shown the small discoveries you've made so far.
5. Remember what you've done
For some, novelty isn't a motivator, but past achievements can be. So, if you're down in the thesis dumps, take a pause and think about all of the amazing things you've achieved so far. Good job! You've achieved all this....
... now think how many more amazing things you have yet to come!
Good luck everybody. Chin up, keep smiling, and prove to the world you've done something nobody has ever done before, however small or large.