An image from “The Picture Perfect Life,” Google's new ad. (Google)

Google debuted a new ad during Sunday's Grammy Awards that spotlights the mental-health implications of the tools that it has helped put in the hands of billions of smartphone users.

The ad, which has been viewed more than 17 million times on Twitter and Google's YouTube, opens with the kinds of shiny, happy images that dominate social media: backyard parties, charming children and a fashionable woman “with all the friends that'll like her post from Friday night.”

Then the ad pivots, suggesting “not every picture tells the whole story” — and reveals a woman whose Google Pixel 2 smartphone bears the number for the National Suicide Prevention Lifeline.

The ad touches on a fraught issue for tech giants such as Google, Facebook and Apple, which face a growing body of research suggesting the mental-health effects of an Internet-connected life could prove more damaging than originally thought.

Google's ad touches on what mental-health experts say is the pressure of perfection, as seemingly shown through the glossy photos of social-media services such as Facebook's Instagram. Recently published research, including from Facebook itself, has raised new questions about the effect of social media and screen time on users' happiness and self esteem.

Last month, Facebook researchers published a post saying that using the service could leave people unhappy, particularly if they spent “a lot of time passively consuming information,” such as flicking through status updates. The researchers said Facebook is “in a unique position to connect people in distress with resources that can help.”

But beyond upbeat photos and videos, tech companies have also come under fire for helping spread offensive and sometimes haunting scenes. Earlier this month, one of YouTube's biggest stars, Logan Paul, apologized after he posted footage of a dead body that he and his band of young pranksters discovered in a Japanese forest infamous for suicides. YouTube said in a statement that the video violated its policies and added, “Suicide is not a joke, nor should it ever be a driving force for views.”

[Child advocates urge Facebook to end Messenger Kids]

A Google spokesman said “The Picture Perfect Life” ad is “part of a wider set of stories that encourage people to question their lens on the world,” and that other ads will be unveiled in coming months. The ad followed a Grammy performance by the rapper Logic of his song "1-800-273-8255,” named for the suicide-prevention hotline, and came amid other Pixel 2 ads that were more celebratory and less self-conscious of the modern photo culture. Google says the new ad was in the works before Logan Paul's since-deleted video.

Google searches for suicide methods spiked last year after Netflix released "13 Reasons Why,” a high school drama that centered on a teen's suicide, according to research published last year by the American Medical Association. Research published last month in the peer-reviewed journal Public Health suggested that searches and suicides were linked, adding that search propensity is a “statistically significant predictor” for the number of youth suicides.

Facebook, the 2 billion-user social network, said it would hire thousands of additional employees for its content-review and outreach teams last year after a disturbing series of live-streamed suicides, including the death in Georgia of a 12-year-old girl.

In November, Facebook chief executive Mark Zuckerberg wrote that his social media giant had begun using artificial intelligence to help prevent suicide by, for instance, recognizing when a user is expressing thoughts about suicide or people are commenting asking whether someone is okay. Within the past month, Zuckerberg said, the AI tools had “helped us connect with first responders quickly more than 100 times.”

[Facebook is using AI to try to prevent suicide]

Two major Apple shareholders this month called on the company to focus more on safeguards for young people using their products, citing recent studies that appeared to link phone use with feelings of addiction, anxiety or depression.

Daniel J. Reidenberg, the executive director of the suicide-prevention nonprofit group SAVE, said he was first contacted by companies such as Facebook a decade ago for guidance in how to direct people to help. But he has noticed a surge in tech companies' interest in modernizing suicide-prevention efforts, which he called “our best hope at reducing the burdens of suicide at a global scale.”

The companies' increased attention “has been somewhat based on the need and the advancement technology has afforded us,” Reidenberg said. “Some of it has been brought on by the public outcry that these companies need to do more. And the companies have responded.”

Google has for months attempted to reach out to people needing help. Someone who searches for “how to commit suicide” on Google is shown a special card with the suicide-prevention hotline, a link to an online chat with mental-health counselors, and reassurance that “you're not alone. Confidential help is available for free.” But the search also reveals the tech giant's limits: The first page is filled with search results including a page on “how to commit suicide the right way,” as well as a 12-minute guide on YouTube.