I hit an insomniac patch recently when I ran out of "comfort shows" — the TV series I watch when I need to be soothed out of a particular mindset and eased into oblivion. Comfort shows aren't new; I've seen them before, and I know what happens. But they're just absorbing enough to get me out of my head. They provide a reset that lets me move on (or — let's face it — sleep).

Over the years, I've started prescribing shows to friends depending on their life situation. Below is a guide to shows suited to different moods and problems. Your mileage may vary.

You can't sleep. Watch Frasier.

You have an enemy you wish to destroy. Buy the DVDs of Channel 4's Mapp and Lucia (starring Geraldine McEwan as Lucia, Prunella Scales as the embattled Mapp, and Nigel Hawthorne as Lucia's delightfully dandified BFF Georgie). The costumes are wonderful and the contest is marvelously unfair. The longest opening credits in the world will lull you into a sense of pastoral repose, and then Lucia will strike — and you will learn.

You're sad. Sadness is more a state than a feeling. Sometimes it helps to sharpen hopelessness into art until its excess bursts you open. Sometimes it helps to watch others living with it. For this — and for channeling the ambient despair you might feel at human cruelty, or human kindness coupled with little hope — you really can't do better than The Leftovers. It will not fix, but it will help.

You think love is a myth and secretly doubt that an equal relationship between partners is possible. To widen your sense of improbably successful partnerships, you'll need to watch The Americans and The Santa Clarita Diet.

Your political anxiety is manifesting as nostalgia for a time when the government, however evil, seemed to be in control. I recommend Yes, Minister. The elected official is consistently outsmarted by the bureaucrats of the Civil Service and you may find it interesting to see whether these peculiar times alter your response to the show. (You may, for example, find yourself disloyally rooting for the bureaucrat. Then again, you might find yourself becoming an anarchist.)

You secretly miss Scrubs. Dear reader, it is my privilege, truly, to inform you that Green Wing exists. Olivia Cole and Tamsin Greig and Michelle Gomez are in it. It is marvelous.

You're grossed out and embarrassed by your own desires and by your attraction to awful men. I Love Dick is there for you.

You're an ambivalent, indecisive person trying to think through hard, almost insoluble issues at a time when polarized positions seem necessary. There are two equally essential answers here. One is Crazy Ex-Girlfriend. The other is The Good Place. These are cheerful, colorful, saturated shows that fool you into taking on the Big Problems over and over and over. They don't solve them, but they also don't shy away. They're the Energizer Bunnies of moral philosophy. They're doing the thinking and making it fun.

You long to connect to your elderly relatives but are shaken by the revelation that they're every bit as lost as you are, actually. Depending on the severity of your symptoms, you could hit a few episodes of The Golden Girls to relish a version of old age that admits and embraces the fact that it's still learning, or watch Murder, She Wroteand indulge the fantasy that some elders remain possessed of calm good sense.

You fear you've become so conventional you no longer see it. Maybe your brand of conventionality has even isolated you from those you grew up with. Watch Keeping up Appearances and shudder at what you've become.

At work, you find yourself staring at the clock, feeling the infinite gravity of each passing minute. Sometimes you can even feel yourself doing some of the dying you'll eventually complete. Ricky Gervais and Stephen Merchant's The Office will address this nicely. (Contraindicated: America's The Office, which, however charming, ultimately argues that your work family is family.) Breaking Bad if you sense that for you, exorcising ennui means maxing out on adrenaline and pessimism. Otherwise — and I sincerely believe this is a spiritual match even though it addresses something totally different — FX's Atlanta.

Your family is driving you bonkers. The good news is you have options. If you want to feel better about the clan, Arrested Development will re-teach you to find their awfulness (and your own) funny and even — from a certain third-person view — lovable, warts and all. If you're feeling introspective, Gilmore Girls might give you some conceptual scaffolding for why things are going wrong. If what you'd really like is to love everyone simply again and let sentiment wash the bad stuff away, Parenthood can help. Sometimes sympathetic role-reversals help: If you're the kid, Fresh off the Boat will make you side with the parents. If you're the parent, The Americans will make you side with the kids.

The bad news is that some shows are seriously contraindicated: Do not, under any circumstances, watch Everybody Loves Raymond.

You ignored the above and watched Everybody Loves Raymond. Now your fury at men is absolute. This is an emergency. Hey: It's okay. You're fine. You need to mainline Peep Show right now. It's not just funny; it's the kind of amiable, off-kilter X-ray into a kind of homosocial masculinity that's so well-done and relatably foul that you'll find yourself sympathizing — and wondering why men and women think they're so different.

You're pretty much done with women, men, and everyone, frankly. People are terrible. High Maintenance will gently remind you that people may be terrible, but they're lovable too. Conversely, Lisa Kudrow's Web Therapy will teach you to relish the awfulness of others.

Current events have you trying to get a grip on how America went wrong. Watch Seinfeld and Friends. It's all there.

Your secret fear is that comedy, which you love, is intrinsically cruel. And that the part of you that feeds on it is a kindness vampire on a flagging world. The Maria Bamford Show (on YouTube) will do curious things to this perspective. And each episode is (at most) five minutes long.

You feel graceless or charmless or low. There are two schools of thought here: One is that it might help to watch fascinating people fascinate. A true tough love regimen (that will either buck you up or crush you with your inadequacy) requires watching the Miss Fisher Murder Mysteries and soaking in Phryne Fisher's (Essie Davis) confident, unerring, coquettish poise.

If, on the other hand, you want to go deep and really research the problem, you can't go wrong with Issa Rae's web series The Misadventures of Awkward Black Girl. The Book Group will, similarly, hold up a mirror that reflects without reassurance. Annie Griffin wrote this fantastically odd show about an American woman who's feeling lonely and disconnected in Glasgow. Deservedly: She's so unpleasant that you sort of get why she has no friends because she reflects our least flattering ideas about ourselves. Anne Dudek plays Clare Pettengill, a heroine so ungainly that you'll feel a thrill of kinship with her. Scottish comedy genius Michelle Gomez plays one of the WAGs who end up joining the group, and the contrast between them and Clare makes this a true wonder.

You feel out of control. Fawlty Towers is on Netflix. How are you not watching Basil Fawlty losing it right now.

You are grief-stricken. Give the first three seasons of Northern Exposure a try. Grief is all-consuming and boring and repetitive. Northern Exposure — an oldie but a goodie about a young Jewish doctor who ends up paying for his medical training through service in the tiny Alaskan town of Cicely, Alaska — is absorbing and weird enough (without being taxing) to take your mind off its sad rhythms. Plus there's a kind of radical gentle amnesty to it, mixed up with Jung, that equips its universe to reckon with things like death. There are problems — oh there are problems — but it knows it, and that actually helps. This show is largely about feelings and how communities organize around them. That helps too.

While you liked the isolation and world-building of Northern Exposure, you found it sappy and idealistic. Watch Fortitude. Or — yes — Twin Peaks.

You don't miss Friends — you're too cool for that — but you miss who you were when you watched Friends. Episodes. The answer is Episodes. Like a vaccine, it is somehow both tonic and disease.

You feel small and ineffectual and have lost your grip on the serious work you once believed in. Curiously enough, the answer to this is Better Call Saul — a show so focused on process it sometimes forgets everything else.

You've taken up a persona you now find it difficult to take off. Your secret fear is that no one quite knows who you are any longer. You need to watch Fleabag, my wonderful, fraudulent friend.