"The Sixth Sense" shocked audiences 20 years ago this week, and actor Donnie Wahlberg is opening up about his intense preparations for the film.

The then 28-year-old Wahlberg stunned moviegoers as Vincent Gray, a former patient of psychiatrist Dr. Malcolm Crowe (played by Bruce Willis), who storms into his home and shoots him, before killing himself. The film also memorably stars then-child actor Haley Joel Osment, who delivers the famous line, "I see dead people."

Before signing onto the M. Night Shyamalan thriller, the current "Blue Bloods" star, now 49, was best known as an original member of New Kids on the Block, before transitioning over to dramatic acting. According to Wahlberg, he had to mentally travel to "a really dark place" for the role, which he described as a "game changer" for his career.

ACTOR DONNIE WAHLBERG TIPS $2K AT CHARLOTTE WAFFLE HOUSE

Donnie Wahlberg as Vincent Gray in "The Sixth Sense." The actor, then 28, dropped 43 pounds for the role.

Donnie Wahlberg as Vincent Gray in "The Sixth Sense." The actor, then 28, dropped 43 pounds for the role. (Walt Disney Studios)

"Every day for years people would say, 'Dude, I didn't know that was you,'" Wahlberg told USA Today. "At that time, I did exactly what I needed to do for the role. I had to look like I was going through hell. I went to a really dark place."

The actor recalled "totally crying on the plane" upon reading the film's script for the very first time, but thought no part was suitable for him, as he was too old and well-built. "Nothing about me was right for the part, except for my total enthusiasm for the script," he confessed.

"The movie is such a great source of pride for me. Not just my work but to be part of that group." 

— Donnie Wahlberg

However, Wahlberg decided to meet Shyamalan in New York City anyway, where the director ultimately decided he could find a suitable role for him. When the actor's agent dismissed the low pay-day for the role, Wahlberg was too excited about the role to jump ship.

JENNY MCCARTHY GUSHES ABOUT DONNIE WAHLBERG: 'I THOUGHT FOR SURE I WOULD BE GOING AT IT ALONE'

"I said, 'I don’t care, I’d do it for free,'" Wahlberg recalled. "So I took the part and I subsequently fired my manager for telling me to pass."

Upon securing the role, Wahlberg isolated himself from his then-wife, Kimberly Fey, and their two children, to a remote apartment in New York City in order to prepare for his time on set. The actor recalled cutting back intensely on food, and intentionally neglecting his own hygiene, in order to make his performance seem genuine.

"I starved myself. I would fast for two days then only eat steamed cabbage and drink beet juice. I would chew gum all day and I would literally walk around the streets to burn thousands of calories. I didn’t shower for weeks," he remembers. "I just wasn’t taking care of myself and I was a loner. That was as close as I could come to this guy. I definitely had to suffer in the only way I could."

THEN/NOW: SEE THE 'BH90210' CAST OVER THE YEARS AHEAD OF THE NEW REBOOT

Donnie Wahlberg is seen filming "Blue Bloods" on March 12, 2019 in New York City. (Photo by Jose Perez/Bauer-Griffin/GC Images)

Donnie Wahlberg is seen filming "Blue Bloods" on March 12, 2019 in New York City. (Photo by Jose Perez/Bauer-Griffin/GC Images)

Wahlberg later added, "I was so hungry. I was depressed. I cut off my life to get ready for the role."

Upon returning to the set, Wahlberg had dropped 43 pounds, which made him unrecognizable to those working around him, even Shyamalan himself. He then remembered settling on the proper wardrobe for Gray, which solely consisted of a beat-up pair of underwear.

"I asked to make [the underwear] look like I hadn’t changed them in, like, two years," Wahlberg says. "They soiled them up. That became the wardrobe."

MARVEL STAR OLIVIA HOLT SAYS MILLENNIALS, GEN Z 'CAN BE THE GENERATION THAT PUTS AN END' TO THE OPIOID CRISIS

And then, it was finally time to shoot the scene.

Upon filming the scene's first take, Wahlberg was instructed to cut before Gray points the gun to his head, but the actor, in the heat of the moment, remarkably performed the entire scene perfectly.

EMMA WATSON HELPS LAUNCH A WORKPLACE SEXUAL HARASSMENT HOTLINE

"I fell on the floor, and I remember Bruce was like, 'Whoa!' and I was bawling my eyes out. M. Night came running over and was hugging me. He was like, 'That was so unbelievable.' I was thinking that I’m done. And M. Night was like, 'OK. Can you do it again?' I was like, 'What?'"

Turns out, the entire three-minute scene required a full day of filming to create Shaymalan's intended vision. "I thought I had to nail it in one shot," said Wahlberg. "But I had, like, eight hours of work ahead of me."

Nevertheless, the actor, who "looked like a crazy person," successfully finished the day of filming without issue. To this day, he said he has never encountered a role as intense as Gray.

CLICK HERE TO GET THE FOX NEWS APP

"The movie is such a great source of pride for me. Not just my work but to be part of that group," said Wahlberg of the now-iconic film. "Everyone brought it so hard for that movie."