LONDON — Weeks before taking her own life, Caroline Flack, the British television personality, wrote that she had been suffering from an emotional breakdown “for a very long time,” according to an unpublished social media post made public by her family on Wednesday.

Ms. Flack, 40, was arrested in December and later charged with assaulting her boyfriend. In the post, she wrote, “within 24 hours my whole world and future was swept from under my feet.”

Ms. Flack, who died on Saturday, was one of Britain’s most famous television faces and spent years working on a number of reality television shows. But she shot to new levels of fame as the host of “Love Island,” a hit reality dating show in which the public votes off “islanders” until one victorious couple remains.

Ms. Flack stepped down from the hosting role after her arrest late last year, as the episode with her boyfriend, the tennis player Lewis Burton, was widely scrutinized by the British media. The television celebrity had pleaded not guilty to the charges of assaulting Mr. Burton and said in the unpublished post that it had been “an accident.”