‘remember when i was like hey i have no tears left to cry and the universe was like HAAAAAAAAA bitch u thought,” Ariana Grande confided in her 59.4 million Twitter followers last month. It was the kind of darkly funny self-deprecation her fans have come to know and love – more like a text you’d send to your best friend than to a group as big as the population of Italy.

This has been the worst year of her life, as a visibly emotional Grande herself said when she accepted the woman of the year award at the Billboard Women in Music awards recently. Released in April, her single No Tears Left to Cry marked her return to music after the terror attack at her Manchester concert in May 2017. Earlier this year, she ended her two-year relationship with the rapper Mac Miller after his substance abuse became, in her words, “toxic” (he died of an accidental overdose in September). The following month, after a highly public whirlwind romance, Grande called off a short-lived engagement to the Saturday Night Live comedian Pete Davidson.

But it has also been her biggest year professionally. Her fourth album, Sweetener, was widely acclaimed and will be up for best pop vocal album at the 2019 Grammy awards. A new, non-album single, Thank U, Next, has broken streaming records; an album of the same name is promised imminently. In March, she will embark on a world tour, promising a special show for Manchester.

In the throes of personal upheaval and heartbreak – not to mention the workaday grind – Grande has not only found resilience but sought to spread it. Her One Love Manchester concert raised £17m for victims and their families. Three months later, while still experiencing post-traumatic stress disorder and anxiety, she performed at the Concert for Charlottesville benefit for victims of an attack at a far-right rally in Virginia. This March, she met survivors of the Parkland, Florida school shooting at the March for Our Lives in Washington DC.

Facebook Twitter Pinterest ‘We put a lot on her shoulders’ ... Grande wipes away a tear as she performs at One Love Manchester last year. Photograph: Kevin Mazur/One Love Manchester/Getty

Grande has aligned herself with Black Lives Matter, against Trump, and for gun reform and gender equality. She articulated her post-Manchester philosophy to Elle magazine as trying “to spread the fucking light”. She went on: “Not everyone is going to agree … but that doesn’t mean I’m just going to shut up and sing my songs. I’m also going to be a human being who cares about other human beings; to be an ally and use my privilege to help educate people.”

Musically, too, she has turned towards the light. Sweetener is a steadfast expression of optimism, its title track a reference to seeking out and savouring the good. On Thank U, Next, she expresses gratitude for the lessons of her past relationships – including that with Davidson, only three weeks after their split. One fan tweeted: “Who is Ariana’s therapist and are they accepting new clients?”

Facebook Twitter Pinterest Grande in 2013. Photograph: Dave Hogan/Getty Images for MTV

Almost every review and interview has marvelled at her fortitude – she is the inverse of the archetypal child star who grows up without coping mechanisms. A former Broadway and Nickelodeon performer, Grande has been in showbusiness for close to half her life. But the events of the last 18 months make it easy to forget that her public image was once not so at odds with that of the young star warped by early fame.

In 2014, the media gossip site Gawker proclaimed, 21-year-old Grande “went from ‘that girl from Nickelodeon’ to one of the biggest divas on the planet. Allegedly.” It detailed (largely unsubstantiated) rumours that she had shoved a TV presenter to get her good side on camera, employed a personal water attendant, made fans at a meet-and-greet cry and wished that another crowd of fans would “all fucking die”. Jezebel embraced with gusto the tabloid rumour that Grande demanded to be “literally carried like a baby” by her staff, eventually claiming to substantiate it with “OVERWHELMING photographic evidence”.

Whether Grande’s reputation at this time was deserved is unclear (she did edit the caption of a photograph showing her being carried to clarify that her “toes were LITERALLY BLEEDING”). But “diva” was an appropriate label in one sense: Grande’s 2013 debut album, Yours Truly, laboured to communicate her mastery of a virtuoso vocal range that has been compared to Mariah Carey, often at the expense of the songs and, infamously, the enunciation. With her public image little more developed than that of a little girl with a big voice, it was easily distorted by what became known as “donutgate”.

In July 2015, TMZ published security footage of Grande, then 22, larking about in a California doughnut shop with her new boyfriend. She licked a doughnut she hadn’t paid for and remarked: “I hate Americans. I hate America.” The shop’s health rating was lowered and the owner said he thought Grande should be charged; a former Miss Kansas said she was “disgusted that someone can lack so much decency”.

Looking back, the outrage reflects either a more innocent time or an early indicator of today’s “alternative facts” bubble. Grande apologised for her word choice, saying she was expressing frustration at high child obesity rates in the US – a PR move that raised eyebrows but not her reputation. The 2016 DNC email hack revealed that “donutgate” cost her a gig at the Obama White House.

Yet, for all her notoriety among gossip bloggers and rightwing pundits, Grande was not quite a household name when her Manchester concert was attacked. By then she had pivoted to cheeky, forthright pop on her well-received third album, Dangerous Woman, landing her somewhere between demure Taylor Swift and the more daring Demi Lovato in the layperson’s pop-star nexus.

The suicide bomber struck in the foyer at 10.30pm on 22 May 2017, just after the encore. Twenty-three people, including the attacker, were killed and at least 139 wounded. Grande’s mother, Joan, was in the audience, desperately searching for her child. “Everyone was leaving, and I was going towards the stage,” she told Elle. “Those minutes when you don’t know what’s happening – there are no words.” Grande’s statement to her fans that night momentarily became the most-liked tweet in history: “broken. from the bottom of my heart, i am so so sorry. i don’t have words.”

Facebook Twitter Pinterest Unwanted milestone … floral tributes to the victims of the attack at Grande’s Manchester Arena concert. Photograph: Christopher Furlong/Getty Images

As the New York Times critic Jon Pareles wrote in his review of Sweetener: “No pop career should ever have a terrorist attack as a milestone.” But it is undeniable that Grande’s response to the Manchester bombing changed her public image. She struck a stateswomanly figure at the star-studded One Love event, defiantly performing her raunchiest hits at the request of one victim’s mother after the Daily Mail suggested that the bomber targeted the concert because of her sexualised aesthetic. She closed with a stripped-back rendition of Somewhere Over the Rainbow that was no less moving for its technical prowess. Her image – until recently subject to definition by other people – came into focus as standing for courage, integrity, resilience, hope.

Even Piers Morgan, never one to let go of a stick with which to beat women, admitted to having “misjudged her”. She was weeks shy of her 24th birthday. “We put a lot on her shoulders,” said her manager, Scooter Braun. “And she took over. You know, for the rest of her life, she can say that she is exactly who she claims to be.” The following month she was made the first honorary Mancunian, the city council moving unanimously to recognise the contribution of this “young American woman for whom it would have been understandable if she never wanted to see this place again”.

Speculation that her new music might be maudlin by the weight of what it had to acknowledge proved misplaced. Lingering on “the absolute worst of humanity” would give it power, she told Time: “The last thing I would ever want is for my fans to see something like that happen and think it won.” With Sweetener, Grande embraced joy without pretending it was easy. Working with Pharrell and producer Max Martin, she landed on a looser, more idiosyncratic sound, placing emotional acuity above vocal technique. “Here is my bleeding heart, and here is a trap beat behind it,” is how she characterised it.

Critic Lindsay Zoladz named Sweetener the year’s pop album to beat: “A defiant record, chronicling both the difficulty and necessity of choosing to be happy.” Grande has credited this defiance to more than a decade in therapy, first dating to her parents’ divorce and ramped up post-Manchester. The tweet shouting out her therapist was “funny as fuck”, she replied, “but in all honesty, therapy has saved my life so many times. if you’re afraid to ask for help, don’t be.”

Part of that work, Grande has said, has been advocating for good despite the risk of backlash – and, tellingly, doing so not just as a fundraising figurehead, but in small interactions that reflect a commitment to acting with integrity. When a fan linked Miller’s drink-driving charge to Grande’s having “dumped him for another dude” as “just the most heartbreaking thing happening in Hollywood”, Grande addressed the fan in a searing but respectful shutdown: “shaming/blaming women for a man’s inability to keep his shit together is a very major problem. let’s please stop doing that.”

Facebook Twitter Pinterest Whirlwind romance ... Pete Davidson and Ariana Grande in August 2018. Photograph: Kevin Mazur/WireImage

She was similarly scathing of Morgan’s criticism of Little Mix’s nude album shoot last month: “i look forward to the day you realize there are other ways to go about making yourself relevant than to criticize young, beautiful, successful women for everything they do”. Such “clapbacks” are a well-established currency of the celebrity ecosystem, but at a time when the highest-profile celebrities – Beyoncé, Taylor Swift, Adele – are defined by their silence, Grande explains herself, and even apologises.

When, in July, her fans questioned a tasteless joke by Davidson (he said, to demonstrate Grande’s celebrity: “Britney Spears didn’t have a terrorist attack at her concert”), Grande engaged. “This has been v tough and conflicting on my heart,” she tweeted (and, more recently, deleted). “ … I, of course, didn’t find it funny.” This month, chided by Kanye West for seeming to dismiss his mental illness to promote her new song Imagine she apologised for the “probably insensitive” remark without conceding much: “With all due respect, i don’t need to use anyone to promote anything. period.”

Gossip blogger Elaine Lui, once one of Grande’s least sympathetic commentators, wrote approvingly of the woman emerging from “the girl who got caught on camera licking donuts”. Lui wrote: “She is showing how you can move on from it and organically change the way you are perceived without it feeling like she’s putting on and discarding personalities for convenience.” Thank U, Next felt like the culmination of that work. When it appeared a few weeks after the end of her engagement, it was reasonable to expect a scorched-earth diss about moving on to better things. Instead it was a beatific thank you from Grande to her exes. “Rather than zap the pain from memory, Grande assesses the damage and rebuilds from the ground up,” wrote Vulture, naming it the best song of 2018. At the time of writing it has spent five weeks on top of the Billboard Hot 100, the first single by a female artist to do so since Sia’s Cheap Thrills in August 2016, and six weeks at No 1 in the UK.

The song’s much-hyped, big-budget “video event”, spoofing teen movies Mean Girls, Legally Blonde, 13 Going on 30 and Bring It On, also broke a number of records, but by perpetuating archetypes rather than subverting them, it threatened to overshadow the lyrics’ quietly revolutionary sentiment. Similarly, another recent YouTube partnership, the Dangerous Woman Tour Diaries, was uncompelling, Grande’s presence unfocused in the meandering, PR-drawn definition of “documentary”. It suggests a risk that the forthrightness that make her so compelling could become more distant as her star rises.

For now, Grande burns bright as a symbol of resilience: a young woman who defied the belittling diva narrative; who says she emerged from tragedy “loving a bit more fearlessly” than she did before; who named a song after her then-very-new fiance because, as she put it, “i been the fuck thru it and life’s too short to be cryptic n shit about something as beautiful as this love” – and who stayed strong when that soured, too. The question of whether celebrities are role models by default seems quaint when the US president reportedly ran for office to boost his own profile above that of Gwen Stefani. But Grande’s resolute, clear-eyed optimism represents a different way to be: that it is possible to choose to be hopeful, even when that seems futile.

Facebook Twitter Pinterest Clear-eyed hope … Grande at Billboard’s 2018 Women in Music event. Photograph: Angela Weiss/AFP/Getty Images

“Sometimes it’s kind of just about being the light in a situation,” said Grande of the power of pop music. The same could be said of the space she has created for herself in contemporary culture. Whether she caught wind of a society-wide turn towards hope or sparked it herself, it seems to be spreading. Some of this year’s biggest songs – the 1975’s Love It If We Made It; Bastille and Marshmello’s collaboration with its chorus, “I want you to be happier” – were earnest expressions of hope in an uncertain future. Avengers: Infinity War, Mission: Impossible – Fallout and Deadpool 2 had storylines about the rewards of acting with kindness and empathy. Even Pantone said its colour of the year – a vibrant burnt coral, carefully chosen to represent “a feeling that’s out there in the zeitgeist” – symbolises “our innate need for optimism”.

Perhaps Grande realised its importance sooner than everyone else. Accepting Billboard’s woman of the year award, she said she may well be at the peak of her artistry, “but as far as my personal life goes I really have no idea what the fuck I’m doing”. She continued, her voice thickening: “I just want to say that if you’re someone out there who has no idea what this next chapter is going to bring, you’re not alone in that.” Then she pulled herself together and beamed. “Ew. I’m not going to cry.”

• This article was amended on 27 December 2018 to clarify that the death toll of 23 for the Manchester Arena bombing included the attacker.