Here are a few things that help me to avoid the depths of despair:
NEVER forget why you write: Because you LOVE it.
INSPIRATION. This is the driving force. What gave you the IDEA? Another book? Pinterest images? Films? TV series? A song? Revisit what inspired you. For me, my inspiring idea usually becomes the book's THEME.
IMAGINATION. You have to feed your brain dragon. As above--books, films, TV series, magazines, music.
READ. Read writers you love so that you REMEMBER WHY you love to write. But also read books outside your comfort zone. Expand your interests. There are compelling non-fiction books. There are exquisitely realistic fiction books.
BLOGS. Visit blogs about writing for strategy. Visit author blogs for advice.
SELF-PUBLISH. Remember self-publishing and small presses are an option. Make sure you invest in the two most important aspects of your book--a professional EDITOR and a gorgeous COVER. Then you need to invest in a marketing campaign.
FUTURE PROJECTS. always have a list of books you're looking forward to writing. This means you'll finish the story you began and you'll already have a few plot lines and characters for future fun.
SUPPORT. Connect to other writers via social media or writing groups.
TAKE A BREAK. Take a nap. Take a walk. Get some tasks done. Get away from the story so that you can THINK about the story.
JOURNAL. Keep a journal of future ideas. This keeps your creative fires burning. Write down everything. Cool character names. Weird little sentences. Fabulous words. Gorgeous descriptions.
That's it! Happy writing:)