Oscar Wilde said there were only two tragedies in this world: not getting what you want – and getting it. The quote has thrived on Instagram, shared ad infinitum in a jazzy font, and it sums up the awful circumstances that led Jesy of Little Mix to make this sad, raw documentary. Jesy Nelson: Odd One Out plays like a fairytale in reverse.

Nelson was a barmaid in Dagenham, east London, who dreamed of becoming an entertainer. She watched The X Factor in the pub where she worked and thought, I could win that. In 2011, she entered the competition, became one quarter of a girl band with three other young women, who became her best friends, and went ahead and won the whole thing. It was her dream come true.

It was also the early days of social media morphing into the beast it is today. Even as Little Mix progressed through the weekly knockout stages, Nelson was receiving comments and messages from online trolls who criticised her weight and face, and told her, in a variety of creatively cruel ways, that she did not deserve to live.

She was barely 20 years old. She talks candidly about how this onslaught chipped away at not only her self-esteem, but her sense of who she was. She can barely watch footage of herself from that time, or look at pictures. She had been happy. As Jesy from Little Mix, she was miserable, constantly questioning herself and struggling with what sounds like an eating disorder. Eventually, she attempted suicide.

This is a personal story and Nelson is clearly still dealing with the suffering she endured as the target of such horrible online abuse. She has a cushion over her lap as she is interviewed. She worries how she looks.

There is a sense that this documentary is part of the therapeutic process; she is not on the other side of the bullying yet and, at times, that makes it difficult to watch. Her mother talks movingly about how much she wishes she could have her pre-fame daughter back. Her bandmates are frank about how her insecurities, amplified beyond common sense or rationality, can make her “a bit of a nightmare”. Her boyfriend Chris Hughes, himself a product of the fame factory (in his case, Love Island), wishes she could be more comfortable in her skin. Even in the present day, glammed up for a video shoot, she refers to herself as “a fat, ugly rat”.

Though more of an intimate “my journey” story than the recent Channel 4 three-parter, Jade, both shows communicate, with a cold, clear eye, the damage caused by casual cruelty. For Goody, that came first from the tabloids who saw her as fair game. Fast-forward a few years and for Nelson, it came from the public. Both women experienced fame forged in reality television. The X Factor is a looming spectre here, and I was left wondering about the responsibility of the machine that made Nelson and the many other young people catapulted into stardom by it.

Fame is a horrible business for most who cross its path, and it would be hard to watch this documentary and come away with the illusion that it is anything else.

But this programme is about cyberbullying, not reality TV, and Nelson widens her scope to meet other young people who have been bullied online. The frequency with which the words “kill yourself” are used as a throwaway insult is a shocking indictment of our times. Most harrowing of all is a visit to the parents of a teenager, Sian, who took her own life after being bullied on social media. All Nelson can do is marvel at their courage and resilience.

There is a deep seam of sadness running through her story, but Nelson explains that her openness is an attempt to reach out to others going through whatever version of this trauma they are experiencing. According to a sobering statistic at the end of the film, seven out of 10 young people have been cyberbullied. She meets a support group and sits in on a class provided by an anti-bullying organisation. In that workshop, they suggest that one might intervene if someone is seen to be receiving nasty comments, by saying something nice, to counteract the horror. It doesn’t seem like nearly enough, but perhaps it is a start.

Surprisingly, Nelson doesn’t feel that social media is all bad. It allows her to interact with her fans, she says. When she posts a throwback image of herself in the old X Factor days, she seems overjoyed by the heart emojis that people leave in response.