It us very difficult to spend all of your spare time writing (especially when you would rather be crushing candy on Facebook), creating a story that you think is brilliant, and having it rejected and rejected over and over again. If that is not torture, I do not know what is. At some point, you have to admit that it is time to move on and forget about that particular manuscript being published.
For myself, I have spent the last few years working on a Young Adult paranormal that came close but has now joined some sisters in the bottom of the drawer. I am ready to call it a day and this is how I know (aside from the number of years spent on it):
I started writing it in 2009 and by 2010 had given it to my writing group, took their suggestions on board, rewrote it and entered it into a contest in the U.S. Three out of the four judges loved it and felt it was publication worthy but the fourth judge sank it so much that it did not advance to the final round. Writing is very subjective. I took all their suggestions on board, rewrote it, and queried about 30 agents in both the U.S. and the U.K. All noes. At that point I was ready to move on. But then I signed up for a writer-in-residence program where you meet up with a published writer to work on your manuscript. I did that for about four months; it was a brilliant experience and I learned a lot more about the craft of writing. She was very encouraging. Again, I took her suggestions on board, rewrote it (again) and when I finished, she gave it to her agent. The agent was not that keen on it. So as last ditch effort, I sent it to a digital publisher in the U.S. and got a lovely letter saying though they loved the main character, the plot, not so much. Another pass.
At this point in time, I have nothing more to give to this project and am itching to move on to something else. It is disappointing that it did not get published, but I learned so much in the process! It is not that hard to move on when you know you have done absolutely everything possible to make it the best it could be to get it published. It was not meant to be and I am ok with that. This is not the book that is going to do it for me. But it might be the next one.
The danger comes in not being able to let go. But sometimes you must let go if you are to get anywhere at all.