Even starship captains get the blues sometimes. And when you get depressed, or when you're stuck in bed with a nasty case of black plague, you need something to cheer you the frak up. Luckily, there are tons of science fiction and fantasy books with proven restorative properties.

Here are 16 terrific SF and fantasy novels that are the perfect pick-me-up if you're feeling blue.

Top image: Good Omens by GraphiteDoll on Deviant Art.

Methodology: To compile an authoritative list of books that are likely to cheer you up, we asked people on io9's Facebook page, so we could gather as wide a sample as we could. Then we picked some of the best answers, based on purely unscientific criteria. (Including wanting this list to include a mixture of superfamous and slightly more obscure titles.) Please tell us your perfect pick-me-up book in the comments!

The Hitchhiker's Guide to the Galaxy by Douglas Adams
What it's about: Planet Earth is destroyed just before it fulfills its secret purpose of generating the question to the answer to Life, the Universe, and Everything, but one Earthling escapes: Arthur Dent, a hapless everyman who's swept up in an unpredictable adventure aboard the bizarre spaceship Heart of Gold. Whew. You didn't think I could summarize that in one sentence, did you?
Why it's a pick-me-up: There's just something about Adams' loopy humor. Says Bianca, "It always picks me right up and even makes me feel better when I'm not feeling depressed." Says Moira, "I read it every year as state tests or ACT/SAT approached and the system felt too big and too terrible to bear."

Nine Princes in Amber by Roger Zelazny
What it's about: Curt Corey wakes up in a New York hospital, suffering from amnesia — and then discovers that he's actually Corwin, one of nine princes of Amber, the "real world" of which all other worlds, including Earth, are shadows. Corwin must face his brother Eric's armies, plus demon assassins and eerie structures, to claim his throne.
Why it's a pick-me-up: It's a thrilling combination of detective novel (as Corwin tries to figure out the truth of his identity) with action-adventure story, with a lot of character study thrown in. Corwin is a fun protagonist to root for, as he outwits the sister who kept him drugged and hidden in an Earth hospital and then makes his way home to disrupt his brother's coronation. It's like a more self-aware Edgar Rice Burroughs.

The Stainless Steel Rat by Harry Harrison
What it's about: The first of many books about "Slippery" Jim DiGriz, con artist and rogue, who cuts a swathe across the galaxy with his dirty deeds and occasional outbreaks of heroism, with his beautiful, deadly wife Angela.
Why it's a pick-me-up: This is another series where the goofy humor and upbeat, heist-movie feel just make you feel like you can deal with anything that comes along. Harrison's writing is so much fun, you can't help but identify with the insouciant trickster hero. "Instant mood boost," says Linda.

Howl's Moving Castle by Diana Wynne Jones
What it's about: Yes, before there was a Hayao Miyazaki movie, there was a classic young adult novel. The book has much the same basic plot: a young woman named Sophie gets cursed to transform into an old woman, and then meets a wizard named Howl, who lives in a magical castle that moves around, with his fire demon. The book is more fairytale-like, with a lot of interlocking mysteries and clever subversions of tropes.
Why it's a pick-me-up: As The Book Smugglers explains, it's a really clever, beautifully written book that reinvents the Beauty and the Beast saga into something where both characters are Beauty and Beast at different times. And it's a book that celebrates language, and shows that words are the true magic.

Callahan's Crosstime Saloon by Spider Robinson
What it's about: This 1977 story collection and its many sequels take place in a very special watering hole, where all of space and time meet and cyborgs, aliens, telepaths and time travelers share their troubles over a drink. It's very similar to Munden's Bar from the Grimjack comics (which it probably helped to inspire.)
Why it's a pick-me-up: This is another series where the goofy good humor and sweetness carry you through — it's like Cheers for space/time travelers, the bar where every sentient knows your name. It also spawned a popular PC game.

Night Watch by Terry Pratchett
What it's about: Sort of an origin story: Sam Vimes of the City Watch gets swept back in time to his own early days, along with a criminal who murders Sam's mentor — and Sam must train himself to be a proper guard.
Why it's a pick-me-up: Actually, Pratchett's books in general earn many, many recommendations for being a source of great comfort. Says Gina, "I keep one of his books with me almost all the time. Just a few pages and I feel like the world is okay again." But Night Watch earns special mention — writing in the Guardian, Cate says, this book is her favorite because it "combines both the darkness and the humor" of Pratchett's best writing. In a separate Guardian article, famed author A.S. Byatt says Night Watch proves that "Pratchett is a master storyteller."

The Mists of Avalon by Marion Zimmer Bradley
What it's about: Basically, a retelling of the Arthurian legends from the perspective of the female characters. Morgaine is reimagined as a priestess of the old Druid religion, trying to protect her matriarchal traditions against the influx of Christianity, rather than a one-dimensional villain.
Why it's a pick-me-up: It's a thousand pages of pure addictive goddess crack. As Nicole Cliffe writes in The Awl, "I completely tore through it and wore more dresses for a while and dragged out my Loreena McKennitt CDs and took a lot of baths with Lush products and pretended to be a servant to the Goddess." Says Ceridwen at Goodreads, "This is by far my favorite reading experience. It was like a drug, like sex, like neither of these things, like itself."

A Wrinkle in Time by Madeleine L'Engle
What it's about: When Meg's father disappears, it's up to her and her weird brother Charles Wallace to plumb the mysteries of the tesseract and get him back, by facing up to the evil superbrain known as "IT".
Why it's a pick-me-up: It's fun and clever and full of musings about time and space and being a misfit, and in the end the key to defeating "IT" comes from love — and somehow, it's not cheesy at all, it's just perfect.

Lord of the Rings by J.R.R. Tolkien
What it's about: J.R.R. Tolkien's classic story about the Hobbit Frodo's quest to deliver the One Ring to the fires of Mount Doom to destroy it before the Eye of Sauron can claim ultimate power. Frodo's helped by his fellow Hobbits, plus Gandalf and the Fellowship of the Ring — but being the "ring-bearer" means a huge temptation and a massive challenge.
Why it's a pick-me-up: Says Harri, "LoTR has been my default release valve for 30 years now. It's the only book I re-read regularly." Adds Alison, "It was LOTR for me 20 years before the movies were ever made, and it's still LOTR, because the movies are nice but they can't replace Tolkien's language."

Ready Player One by Ernie Cline
What it's about: In the 2040s, the virtual OASIS replaces the Web, and Wade Watts escapes into its virtual world — and then gets swept up in trying to find the three keys to unlock an easter egg that will allow him to inherit the fortune of the late James Halliday.
Why it's a pick-me-up: A lot of people mentioned that this had become their new go-to book for cheering up. Like we said in our review, "despite its dystopian flavor, the novel doesn't shy away from giving us lovable characters who succeed through teamwork, anti-authoritarianism, and a love of online anonymity... It goes down like escapism, but sticks with you like a fable should."

Dune by Frank Herbert
What it's about: On the desert planet Arrakis, Paul Atreides and his mother must survive after his father's bloody murder, and Paul leads the Fremen in a holy war to reclaim his birthright and reshape the entire universe.
Why it's a pick-me-up: As psychologist Maria Konnikova wrote for io9 a while back, Dune contains lots of lessons about how to cope with real-life stress and trauma. As Bookslut adds, "Rather than rely on the tropes of the genre, rocket ships and ray guns, Herbert imagines a time when the greatest weapon in the universe is the human mind and spirit. The story is in many ways the spiritual evolution of Paul Atreides."

War for the Oaks by Emma Bull
What it's about: Eddi McCandry is a down-and-out rock 'n' roll singer, whose band has just broken up and whose boyfriend has just dumped her. But then she gets drafted into a secret war between good and evil faeries, and it's time to rock for reals.
Why it's a pick-me-up: "I just feel good when I finish reading it," says Erin. Smart Bitches Trashy Books says this book has everything you need in a book except pirates and spaceships, adding: " if you combine it with some good coffee and some good songs in the background, I can almost guarantee you the perfect day."

The Princess Bride by William Goldman
What it's about: Just like the movie that's based on it, this is a novel about Buttercup, a girl whose great love Westley goes off to sea and has an unfortunate encounter with Dread Pirate Roberts, leading Buttercup to agree to marry the odious Prince Humperdinck — except that she's kidnapped first. This book is structured as "the good parts" of a much longer book by S. Morgenstern, which doesn't actually exist.
Why it's a pick-me-up: Like a lot of the books on this list, it's just pure escapist fun, with lively, clever writing including lots of silly parentheticals. "My first choice," says Jorge. "It never gets old and always makes me smile."

The Harry Potter Books by J.K. Rowling
What it's about: Harry Potter is a young boy living with odious relatives, when he finds out that he's actually destined to be a wizard — and he has a mysterious connection to the evil Voldemort, who killed his real parents and is plotting to return and seek revenge. Harry goes to the fantastical school Hogwarts and learns magic, while coming to grips with his terrible nemesis.
Why it's a pick-me-up: A ton of people mentioned this series, which is one of the all-time great escapist fantasies about growing up and learning your power — which turns quite dark in the later books as Harry's burden grows heavier and he copes with real loss and adversity.

Cats Cradle by Kurt Vonnegut
What it's about: It's a very bleak apocalyptic novel about the deadly substance called Ice-9 which can freeze everything in the world — but it's also a screamingly funny philosophical masterpiece, about how we're all connected by coincidence, and how the greatest truths are also shameful lies.
Why it's a pick-me-up: As Strange Horizons explains in a lovely essay, Vonnegut's book shows that we can choose to believe in foma (or lies, basically) that comfort us and make us "kind and happy and healthy," as Vonnegut puts it. There's a certain cheerfulness in embracing the meaning of meaninglessness.

Good Omens by Terry Pratchett and Neil Gaiman
What it's about: Armageddon, the end of the world, is coming, according to the 17th century book The Nice and Accurate Prophecies of Agnes Nutter, Witch — but the demon Crowley and the Angel Aziraphale have decided they don't want the world to end. So they decide to raise the Antichrist to be unable to choose between good and evil, but unfortunately they have the wrong boy.
Why it's a pick-me-up: Like a lot of the other books on this list, it's both funny and whimsical — but also, it's a very humanist story, as Jo Walton explains in Tor.com: "This is the theme of the whole book, that it is humanity who are the best and the worst, [and] Heaven and Hell don't stack up."