The actor talks with THR about his research for the role, which included an amazing encounter with a veteran who opened up about his own struggle.

[Warning: This story contains spoilers from season three, episode five "Twenty-Two" of FXX's You're the Worst.]

FXX critical darling You're the Worst put PTSD center stage during Wednesday's episode as viewers saw Edgar (Desmin Borges), now off his meds, begin to struggle with insomnia, rage, anxiety and hallucinations before turning to the VA for help.

Sadly, the VA was of no use after learning that sweet and lovable Edgar — who so desperately wanted help — had abandoned his meds on his own.

The episode was told from Edgar's point of view and ran parallel to Jimmy and Gretchen's attempt to have the former feel something for his late father. As Edgar seemingly pondered suicide, the character was eventually befriended by a tow truck driver who randomly showed up to tow his car. As it turns out, he too is a vet struggling with PTSD who helps Edgar find his way out of the darkness.

Below, Borges talks with THR about Edgar's journey and the incredible story of the veteran who visited theYTW writer's room who helped inspire Wednesday's episode.

What was filming this episode like?

Episode five was shot in and around the days that my son was born. And not being able to be there for parts of it and then going back and being with them and then having to come back there and shoot like that, I still have this ridiculous amount of emotion that’s underlying everything that I do every day. Edgar this year is like a seesaw — and that’s where I am in my life. It melded really well into the character and for those moments and those days where I had to really find, grip and embrace the dark sides of Edgar. The parts of him that are really battling with how difficult it is to be off his meds — it somehow was easily accessible. It was just unfortunate that it had to do with real-life circumstances.

At the end of this episode, do you think Edgar has progressed?

He has. It’s the first time that Edgar has stood on his own since he was probably 18 years old, right before he decided to go into the military. Ever since then, he’s always had somebody telling him what to do, where to go, holding his hand, what to wear, encouraging him, discouraging him … and for the first time, it’s just like “f— everyone else! I think I know how to do this, and I think this is the right path, and I’m going to go for it. And if I fail, I fail. I’ve failed at other things before, and I’m here now."

At the end of the episode, Edgar smokes a little weed and that seems to help him. Will that help him cope?

It’s very obvious that whatever one-size-fits-all cocktail of pills — even though they’ve subtly been changing them — are not working for him. He goes through insomnia, rage, anxiety, hallucinatory states — to where he finally gets to the point where he says “F— it!” and turns to medical marijuana. That, at least, takes all the edge off. It’s all still there bubbling, but it’s not as stark and it’s not as night and day with him anymore. He’s not looking for someone to beat the hurt out of him at this point. He’s found something that at least helps him sleep, doesn’t make him hallucinate and actually makes him realize, “Hey I can get through the day. I can do this.”

What kind of research did you do for this episode?

My research process throughout the years has been super interesting, because every season the four months before we start, I go into strict training, eating and sleeping mode. I wear the same five outfits every week. Unless there’s something special, I go to sleep at the same time, I wake up at the same time, I train at the same time, I eat basically the same three to five meals a day to lean out — to be in that military mentality. Meanwhile, I’m reading as much as I can, what’s in the news about the VA, about how vets are being treated. [Showrunner/creator] Stephen Falk and I stay in contact and send stuff back and forth to each other to get hip on what we think Edgar’s journey is going to be like this season. I also know a couple of friends' fathers who have PTSD. And I didn’t know — I’ve known them for 15 years, and for the first 10-12 years I had no idea. They’ve only recently opened up to tell me they have PTSD, and they suffered from it after they saw me in the first season of this show. So between them and between Adam Driver’s not-for-profit that I work with, Arts in the Armed Forces, I’ve gained a lot of veteran friends that I’ve stayed in touch with. Between those two kinds of sources I feel like I’m just a sponge soaking up any story that they’ll tell me.

What's been the most helpful?

Stephen had a vet come to the writer’s room in the first season and he told us his entire story from enlisting in the Army, his first tour, coming back, going to the second tour, being diagnosed with PTSD, not believing it, staying away from meds for almost a year and half, then not being able to handle it, finally getting some form of treatment, relapsing and going down and then getting a service dog. Then the shooting happened at The Dark Knight Risesand he started carrying around a service weapon with him just because he didn’t want to hurt anybody; he wanted someone to see him with a gun and beat the hurt out of him. As soon as he said that, out of everything that I read, that clicked for me. That’s why we see him love so much because he just wants and needs that to counterbalance that feeling. The very first time I spoke to that guy on the phone for an hour and a half, and it’s probably the most touching and impactful story I’ve ever heard in my life.

Have you been approached by people who suffer from PTSD and heard from them about your portrayal?

I’ve definitely had vets come up to me and express how much they love the show, and how they’re so glad that we’re finally telling a different veteran story. One of the greatest things we get to do on this show is give voice to the voiceless. There aren’t a lot of people who look like me on TV; there aren’t a lot of people who have PTSD who look like me on television. I’m very lucky that I get to be one of the first people dipping my toes into the water of what Edgar and this version of a vet is like.

You're the Worst airs Wednesdays at 10 p.m. on FXX. What did you think of the episode?