Mental health advocates yesterday blasted a McDonald’s ad on the MBTA that appears at first to be a public service announcement targeting people suffering from depression.

“It’s really too bad because it trivializes the whole issue of depression,” said Julie Totten, executive director of Waltham-based Families for Depression Awareness, which has been running an ad of its own on the T for its Strides Against Stigma Walk on April 27 at Boston University. “We’re trying to say when you need help, it’s not a laughing matter. We don’t want people to feel stigmatized or made fun of.”

The controversial McDonald’s ad shows a woman with her head buried in her hands. “You’re not alone,” it says, and in smaller print below that, “Millions of people love the Big Mac,” followed by a telephone number.

In a statement, McDonald’s said the ad was only recently brought to its attention.

“We can confirm this ad was not approved by McDonald’s. And, as soon as we learned about it, we asked that it be taken down immediately,” said the fast food giant, which had revenue of $27.6 billion last year. “We have an approval process in place with our marketing and advertising agencies to ensure that all advertising content is consistent with our brand values. Regrettably, in this incident, our agency did not follow that process.”

Pam Hamlin, president of Boston-based Arnold Worldwide, the agency behind the ad, apologized yesterday to McDonald’s and to anyone who was offended.

“McDonald’s did not approve the ad, and its release was our unintended error,” Hamlin said in a statement. “We’ve addressed the issue and have improved our approval process to ensure this does not happen in the future.”

Steve Connelly of the ad firm Connelly Partners said the location where an ad runs often affects how the ad is perceived.

“To do an ad like this in a place like the T, where you see a lot of PSAs offering support services for people, comes with the risk of alienating people,” he said. “It’s a bad marketing environment to do a parody.”

MBTA spokesman Joe Pesaturo said the T made $1,300 by allowing the 28 poster ads to run on one train for one week before McDonald’s pulled them.

“The ads did not violate the MBTA’s court-approved ad guidelines,” Pesaturo said in an email. “The T is required by law to make every effort to maximize nonfare revenue through measures such as advertising sales.”