The city’s police commissioner said he was “knocked down” by an NYPD cop’s suicide this past weekend — the fifth member of service to take his own life since June and the seventh so far this year in a disturbing spate at the department.

“It takes a lot to knock me down,” Police Commissioner James O’Neill told The Post Wednesday. “But, I gotta tell you, it knocked me down. It did.”

He said he got the news in a phone call Saturday afternoon that off-duty Sgt. Terrance McAvoy had fatally shot himself on Staten Island.

“It was just devastating,” said O’Neill, who didn’t know the cop personally. “It’s a loss of a member of the family.”

The NYPD has been struggling with the officer suicides, including that of longtime Detective Joseph Calabrese, 58, and Deputy Chief Steven J. Silks, 62, and plans to start offering training this week to make sure cops know where to get help in the future.

“I think it’s important that we have that information available to everybody out there so they know,” O’Neill said.

“We can minimize the fear of coming forward. We can remove the stigma and that’s a big part of this.”

Executives at every precinct and unit will begin getting training next week about suicide awareness and what resources are available for members, O’Neill said. The department is also making sure that everyone knows the “protocols that are in place regarding the removal of firearms, firearms restoration and what medications can be taken while an officer remains on full duty.”

“I think the most important component is the peer counseling, the peer-to-peer training,” he said. “Police officers will be more apt to talk to another police officer. And if there’s somebody in each precinct, PSA, district, every unit, that knows where to get help and they can do it confidentially I think it’s important that they have that.”

He said cops need to know they won’t automatically have their shields removed or their firearms taken because they have a mental health issue or are on a medication.

“And if it does happen it doesn’t mean that your career is over,” he said. “It’s just like a physical injury. Unfortunately, society doesn’t treat it like a physical injury but it is. We want you to get better. We want you to live the life that you can live and come back to being effective at the job you love.”

The department is even developing an app that each officer will have on their cellphone that will tell them where they can go for help.

“It will give you available services,” he said. “At some point, we’re looking to make it interactive.”

Looking back, O’Neill said when he joined the department in the 1980s people didn’t really talk about officer suicides. Today, he hopes that by talking about officer suicides more people will be encouraged to get help.

“If you need help, come forward,” he said. “There’s so many different places you can go.”

“We all have to make sure that we’re looking out for each other,” he added. “We’re a family. The police department’s a big family and we have to make sure that if we see somebody who’s in distress do our best to make sure that they get help.”