Sarah Hyland's ex-boyfriend reportedly checked into rehab following their split.

The 'Modern Family' star, who secured a temporary restraining order against Matthew Prokop this week after claiming he has been harassing her and abused her before their split after five years together last month, has revealed he sought treatment at an undisclosed facility after moving out of their Los Angeles home in mid-August.

The 23-year-old beauty stated in court documents, obtained by PEOPLE.com, that she was advised to obtain the protection order by the director of the rehab facility before the 24-year-old actor was discharged on Sunday (21.09.14), who warned her about Matthew's ''mental state and attitude.''

The Emmy Award winner invited her co-star Julie Bowen, who plays her mother on the comedy series, to their home to stage an intervention to help her break-up with Matthew last month.

She also claims a mutual friend told her Matthew once said: ''I deserve to die.''

In a statement on Wednesday (24.09.14), Sarah's attorney, Lee A. Sherman, said: ''Out of respect for the court, the process and all parties, I have advised Ms. Hyland not to comment on the matter.''

The former couple started dating after meeting while auditioning for 'High School Musical 3: Senior Year' in 2008. They later starred together in the Disney Channel film 'Geek Charming' in 2011.