Stars who had a rough year in 2018: Sarah Hyland, Ben Affleck and more

Sarah Hyland and Ben Affleck were among the stars who survived turbulent times this year.

These celebrities may be glad 2018 is coming to a close.

Famous people aren’t immune to the illnesses, legal woes and other personal tragedies that befall the rest of us. And for some celebrities, 2018 was a particularly rocky year.

Below, revisit the celebrities for whom 2018 wasn't particularly kind, and here's hoping 2019 treats them better.

Sarah Hyland

The “Modern Family” star weathered a number of storms in 2018, spending much of the year recovering from a second kidney transplant she underwent in 2017. She revealed to Self that the process left her “very depressed,” and she even contemplated suicide when faced with the prospect of a second surgery. Hyland survived another blow earlier this month when her 14-year-old cousin was tragically killed by a drunk driver in Nebraska, and she quit social media because of the hateful comments she received about his death.

More: Hyland takes break from Twitter after users troll cousin's death

Ben Affleck

After completing treatment for alcohol addiction in 2017, the “Justice League” actor was photographed this fall being driven to a rehab center by his ex-wife, Jennifer Garner. In an Instagram post in October, Affleck confirmed that he completed another 40-day treatment program, and he will continue outpatient care moving forward. “Battling any addiction is a lifelong and difficult struggle," he wrote. "Because of that, one is never really in or out of treatment. It is full-time commitment."

More: Affleck finishes rehab, credits family for motivating him to fight alcohol addiction

More: Locklear charged with three misdemeanor counts stemming from June disturbance

Lena Dunham

Dunham began 2018 by sharing the news that she and her longtime musician boyfriend Jack Antonoff had split. She later revealed in the March issue of Vogue that she underwent a total hysterectomy, which removed her cervix and uterus. The “Girls” creator wrote that the operation came after years of painful struggles with her reproductive system, which she opted to undergo at the end of a 12-day hospital stay that included one unsuccessful surgery and seven hours spent in simulated labor.

More: Dunham undergoes total hysterectomy following endometriosis battle

Selena Gomez

After undergoing a kidney transplant in 2017 to treat complications caused by her lupus, the 26-year-old actress was hospitalized again several times this year. In February, she completed a two-week treatment program for depression and anxiety, returning again to a treatment facility in October for her mental health, per E! News and NBC.

'I might die': Gomez was fearful of kidney surgery complications

Matthew Perry

The “Friends” actor apparently saw much of 2018 from inside a hospital. After going dark for several months on social media, Perry tweeted in September that he spent “three months in a hospital bed,” with his representatives confirming that Perry underwent surgery to repair a gastrointestinal perforation.

More: 'Friends' actor reveals 3-month hospital stay

Mel B

Brighter days are on the horizon for Mel B, with her Spice Girls bandmates reuniting next year. But 2018 was a rough year for the 43-year-old star, who sought therapy for her self-described alcohol dependency and PTSD, and continued her public battle against her ex-husband Stephen Belafonte, whom she has accused of abuse. Earlier this month, she landed in the hospital for broken ribs and a partially ”severed” hand, sharing a photo of her massive cast.

Ouch: Mel B says she suffered 'severed' hand, broken ribs in an accident

This article originally appeared on USA TODAY: Stars who had a rough year in 2018: Sarah Hyland, Ben Affleck and more