On Homeland, Claire Danes’ Carrie Mathison is a brilliant and ambitious CIA analyst, gifted with a beautiful mind that sees connections and hidden patterns that others around her can’t. She’s driven to an obsessive fixation on Nicholas Brody (Damian Lewis), a recently returned POW whom she believes to be a terrorist sleeper agent. Carrie, to her horror and ours, is right.

However, Carrie suffers from bipolar disorder, a crippling psychological condition that is sometimes known as manic-depression, which affects roughly 5.7 million Americans, or 2.6 percent of the U.S. adult population, according to data from the National Institute of Mental Health. The illness includes “dramatic shifts in mood, energy, and activity levels that affect a person’s ability to carry out day-to-day tasks” that “are more severe than the normal ups and downs that are experienced by everyone.” (Other symptoms can include but are not limited to erratic behavior, hypersexuality, rapid cycling between mood states, and even delusions and hallucinations.)

What makes Carrie such a superb intelligence agent is also her Achilles’ heel, and her journey over the course of the first season of Homeland was one of frustration, error, and ultimately being right. Her words go unheeded when her condition is discovered by her employers, making her a modern-day Cassandra, a woman too smart for the room, too close to the truth, whose viewpoint is discarded by men who believe they know better. Danes’s stunning performance is one of several new groundbreakingly realistic depictions of mental illness, particularly bipolar disorder, on television.

“A lot of women in particular have responded to this idea that Carrie was right and that nobody knows she was right,” Homeland’s cocreator/executive producer Alex Gansa told The Daily Beast. “There’s a real sense of tragedy in that.”

It’s rare to see a bipolar character at the forefront of a television drama; they’re typically shoved to the sidelines, a crazed killer in a police procedural or an unstable individual in a chance encounter. In fact, one can count on both hands the few bipolar characters who have appeared on television in recent years: Jeremy Sisto’s Billy Chenowith on Six Feet Under, 90210’s Erin Silver (Jessica Stroup), ER’s Maggie Wyczenski (Sally Field, in an Emmy Award-winning turn), Friday Night Lights’ Waverly Grady (Aasha Davis), and NYPD Blue’s Dr. Jennifer Devlin (Chandra West), to name a few. Film and theater haven’t been absent of bipolar characters, either. Films like Shutter Island, Michael Clayton, Mad Love, and The Informant! have all tackled the subject matter to different degrees, while Broadway rock musical Next to Normal depicted bipolar disorder’s effects on a family. (TNT will join the crowd this summer with Perception, which stars Eric McCormack as a paranoid schizophrenic neuroscientist who solves crimes through his hallucinations.) But as individuals become more open about their diagnoses, these portrayals have evolved significantly to become more realistic.

Two specific bipolar characters have captured our attention in recent months, and both appear on Showtime dramas: Homeland’s Carrie, for which Danes won a Golden Globe, and Chloe Webb’s Monica Gallagher on Shameless. The two shows are incredibly dissimilar (one is a psychological thriller, the other a family dramedy) and the two roles are vastly different—one is a CIA operative, the other an errant Chicago mother—but the two women’s portrayals are inherently complementary, with Danes’s Carrie taking us inside an “unquiet mind” and Webb’s Monica serving as a prism through which to see the effects of a bipolar family member on the lives of those around her.

“The interesting thing about bipolar disorder … is that even at the hypomanic stage, which is a degree below the manic stage, these people are incredibly interesting to be with and they are more alive in a way,” Gansa said. “They fly closer to the sun than the rest of us, and there is an incandescence about them.”

On last week’s season finale of Shameless, Monica’s story arc came to a close for now. The second half of the season depicted the Gallagher matriarch yo-yoing between a hypomanic state—in which she rearranged the furniture, took the kids on a shopping spree (spending their “squirrel fund” in the process), bought a car and a carpet cleaner—and a depressed one, in which she couldn’t move or get out of bed. She slit her wrists during the family’s Thanksgiving dinner, drenching the kitchen in her blood, but surviving

“We were all cognizant that it shouldn’t be melodramatic,” said Shameless writer/producer Etan Frankel. “We wanted to make it as real as possible.”

Monica’s suicide attempt felt real and shocking, even in a series set in a slightly heightened reality. There was a sense of verisimilitude and brutal honesty to the sequence, and to Monica’s decision afterward to get help, checking herself into a mental-health facility and getting back on her medication.

“There are parts of Monica that want to change, that want to be there for her children,” said Frankel. “But there are also parts of her that want to do things differently, that don’t want to be numbed by medication ... It’s a battle within her and it's why she changes her mind.” Following her voluntary hospitalization, Monica—true to her wandering and erratic ways—chooses to break out of the facility. But instead of going home, she steals a car and flees with a fellow patient, played by Jenna Elfman. Her giant step backward, a return to noncompliance, comprises a sad if familiar aspect to many of these stories.

It’s the exact opposite trajectory of Danes’s Carrie, in fact. Carrie opted at the end of Homeland’s season to get help and to take her treatment a step further, choosing to undergo electro-convulsive treatment (ECT) in an effort to attain some semblance of stability and responsibility.

“Carrie has reached the point in that last episode where she just can’t take the secrecy anymore, can’t take the bouts of depression anymore, can’t take her thoughts of suicide, can’t take how she’s certainly negatively affected people’s lives around her,” said Gansa. “She has to wrest control of her life back and decides to do this thing, which also has a certain stigma attached to it, and she voices those concerns. Next season, you’ll see a somewhat different Carrie as a result of the new therapy that she’s committed to.”

Carrie’s decision was instantly controversial, despite the fact that ECT has come a long way since the days of One Flew Over the Cuckoo’s Nest, though its efficacy in treating severe depression and mania, among other conditions, has been variable. (Some decried the risk of memory loss as too driven by a demand within the narrative.) However, Gansa pointed to the accounts written by Dr. Leon Rosenberg, a doctor and teacher with bipolar disorder, of his own ECT therapy how it “really quieted his suicidal tendencies and his depression.” Preparing for the season, the writing staff of Homeland researched the psychological disorder, consulting with bipolar individuals, and drew heavily on An Unquiet Mind, a classic book on the subject written by Kay Jamison.

“That was really our bible, our bipolar-illness bible,” said Gansa. “Kay Jamison is a mental-health professional with a mental illness. There was a real parallel, we felt, between a woman in the CIA who had to keep her illness a secret and Kay Jamison, who had to keep her illness a secret from the people that she was practicing with because there was this stigma involved.”

Reluctance to discuss the disorder remains today. “[Carrie] hopefully opens up some dialogue about what it means to have this particular disease,” said Gansa. “In 2002 there were 30,000 suicides in this country directly attributable to bipolar illness, and for all 30,000 that actually completed suicide, there were over a million suicide attempts. Maybe Carrie’s character can … create opportunities for people to get help.”

Meredith Stiehm, a writer and consulting producer on Homeland, has a bipolar sister, Jamie, who recently wrote a New York Times op-ed piece about her struggles. “It was a painful testament to my sister’s skill that scenes that might have been of just passing interest to other viewers pushed me to tears, because in a real way they carried an uncanny emotional resonance,” wrote Jamie Stiehm. “And yet for all that, I feel the show’s creators, writers, and producers, and Ms. Danes, have done us all a public service: perhaps, with the show’s glowing reception, Americans can finally talk openly about bipolar disorder.”

Over at Shameless, Frankel’s father is a psychologist; he said many of the writers on Shameless have family members who are bipolar and they were able to draw on personal stories as well as medical research. “It wasn’t Monica’s story as much as it was the family’s story,” Frankel said. “What is it like to be with someone who has bipolar disorder and goes through these incredible ups that can be so energizing and really fun for the people around her and these crashes that are so low and awful?”

Frankel watched Homeland, riveted by the tension of the terrorism plot and captivated by Danes’s performance and the show’s handling of bipolar illness. “It did really strike me that in Homeland you’re going through the journey with [Carrie],” he said. “On our show, you’re going through it with the family living with it. It’s a different perspective and, juxtaposed, it gives you a really interesting portrait of what it’s like to live with this disorder.”

For Danes’s character, her decision to take control of her life and her psyche once more, even at the risk of her short-term memory, is a positive development, a sign that Carrie is more accepting herself and her limitations, and she’s moving back towards therapy and self-worth. However, any chance of immediate reconciliation between the disgraced analyst and the CIA seems slim at this point.

“Not in the traditional way,” said Gansa. “I don’t think it’s going to be easy for Carrie to come back and work for the intelligence community the way that she has up to this point. Her insights and her experience are going to prove valuable to any intelligence organization even though she suffered this breakdown and this disease. She’s still who she was before. People will consult her, and there are many ways to insinuate herself back into that world without giving her a formal job.”

But in order to break through the stigma associated with this condition, storytellers should offer both sides of the bipolar individual’s crucible: the highs and the lows.

“If you only tell part of that story, it’s not being completely honest,” Frankel said. “If you just tell the story of the bipolar person who is depressed, that’s not really the full picture of what it’s like to go through that and what it’s like to be a family member of someone who goes through that. Sometimes, it can be fun and exciting and … that, to me, leads to a more profound low for everybody. The low was inevitable, but you just want to hope against hope.”

“You want to believe, and unfortunately with that character and the way that she conducts her life, it’s just not in the cards for her to change all that much yet,” he continued. “Maybe one day.”