"I feel like it was supposed to be me somehow because I have a lot of experience working with the homeless, working with the mentally ill"
TrevorLIVE Los Angeles 2016 Fundraiser - Arrivals
Credit: David Crotty/Patrick McMullan via Getty

One year after Pauley Perrette gave emotional testimony against a homeless man who allegedly attacked her outside her home, the NCIS actress says she’s grateful to be alive.

While attending TrevorLIVE in Beverly Hills on Sunday night to benefit LGBTQ youth through the Trevor Project, Perrette told PEOPLE that “faith” got her through the incident — and she feels like things could have been worse had someone else been attacked that night.

“There were a lot of feelings and a lot of emotions, but I feel like at the end of it all, as strange as it sounds, if that incident had to happen in the universe, I feel like it had to be me,” Perrette, 47, says. “I feel like it was supposed to be me somehow because I have a lot of experience working with the homeless, working with the mentally ill. This instance, de-escalation that had to happen right then.”

The actress, who plays forensic scientist Abby Sciuto on the CBS hit, says she’s done a lot of healing over the past year following the “extremely traumatic” attack.

“I think whatever the circumstances are, when you almost get killed, when someone almost kills you, and you’re alive, and you walk away, it really gives you a lot of perspective,” she says.

Perrette took to Twitter to describe the scary incident shortly after it occurred.

RELATED VIDEO: Michael Weatherly Is Leaving NCIS

“So, tonight was awful, life changing and I’m only grateful to be alive,” she tweeted.

Perrette said her alleged assailant, David Merck, “grabbed me in the arm, pinned my arm, punched me in the nose, forehead repeatedly telling me he was going to kill me,” adding that the man kept repeating the name, “William.”

Merck has been charged with one felony count each of making a criminal threat and false imprisonment by violence. He pleaded not guilty to the charges.

The attack, however, did not stop Perrette from attending last year’s TrevorLIVE event.

“I’ve been supporting Trevor for years, and years, and years, and years,” she says. “It’s so important what Trevor does, to offer this kind of resource to LGBT kids that may not get any kind of support in their own town, or in their own church, or in their own home. To have a place to call where someone is going to give you support, give you love, they’re going to understand you, they’re going to listen. That’s what we provide here. It’s imperative. We’re saving lives.”

By Stephanie Petit and Reporting By Scott Huver