A heartsick NYPD cop whose 10-year-old son died after he accidentally shot himself with his dad’s handgun has created a charity in the boy’s name devoted to easing the financial burden of other families that suffer the death of a child.

“Tyler will live on,” said his stoic dad, Joseph Dunne, a cop in Midtown North who, along with the boy’s mom, Jill, a physical therapist, started the Tyler Dunne Foundation.

“Who has a [burial] plot for their kids? No one ever plans for that,” Dunne said, recalling how cops, relatives and friends generously chipped in for Tyler’s $20,000 funeral in May.

“Our mission is to help families with hospital bills, funeral costs, counseling and loss of wages.”

The 14-year veteran cop recalled tough times at his precinct house when collections had been taken up for a cop’s sick kid. “I always gave, hoping that I would never be the one to have a collection taken up for me,” said Dunne.

But tragedy struck on April 30 when the boy went looking for a ball in the basement closet of the family’s Massapequa, L.I., home.

Instead, the fifth-grader found his dad’s .38-caliber revolver. He accidentally squeezed the trigger, and the bullet ripped through his right eye.

“My son was all about giving. If we were at the playground and some kid didn’t have a baseball glove, Tyler would give the kid his glove.”

Then, with a chuckle, the cop added, “And then Tyler would tell me to go buy another one. I’d say, ‘All right, but don’t be giving too many gloves away.’

“He was always kidding and smiling. Nothing ever bothered him.”

“I am destroyed. I will have my happy moments, but no amount of counseling will ever be able to help me,” he said, choking back tears. “He meant so much to me.”

Kerrilyn, 9, Tyler’s sister, is still in shock. “She’s devastated. She cries every day. Besides being brother and sister, they were best friends,” he said.

When Tyler died, his organs were donated.

“My son is a hero. Six people are alive today because of my son,” Dunne said, pointing out that a girl Tyler’s age received his heart and a 2-year-old boy his liver, while a 17-year-old boy and a 6-month-old boy each received a kidney.

Those wishing to make a tax-deductible contribution may mail a check to: The Tyler Dunne Foundation, 26 S. Chestnut St., Massapequa, N.Y. 11758.