A South Carolina mom let out an anguished wail while testifying against her ex-husband, who is facing the death penalty after admitting he murdered all five of their children.

Pain was visible on Amber Kyzer’s face on Monday as she struggled to read aloud a letter she had written to her eldest child, Merah Jones, in 2014 after the couple announced their divorce, The State reported.

“I know that your heart feels heavy and that you feel really sad sometimes I want to reassure you, sweetheart, that you, along with your brothers and sister, mean everything to me,” Kyzer said through sobs. “You kids are my world and Mommy and Daddy were very blessed to have you.”

Suddenly, Kyzer collapsed on the stand, wailing, “Oh God. My babies! My babies!” and her daughter’s name as jurors were quickly escorted out of the courtroom.

Her testimony came in the death penalty trial of her ex, Timothy Jones Jr., who confessed to killing Merah, 8, Elias, 7, Nahtahn, 6, Gabriel, 2, and Abigail Elaine, 1, on Aug. 28, 2017.

Prosecutors say Jones flew into a rage when he found Nahtahn toying with an electrical outlet in their home near Lexington — prompting him to kill the boy and strangle the rest of his siblings.

Jones said he accidentally killed Nahtahn by forcing him to do squats and push-ups for hours as punishment.

Defense lawyers have mounted an insanity defense, claiming Jones is an undiagnosed schizophrenic.

“I was just running on fear, and I wasn’t thinking,” Jones said in his taped confession played in Lexington County court last week, according to The State. “Any normal person would have said, ‘Let me call the police and turn myself in.’ I took the coward route and started following those voices in my head. I’m not thinking anything but I’m screwed … Logic went out the window.”

Kyzer was hysterical as she was led out of the courtroom. Her testimony resumed after a 30-minute break.

She said she had written the letter to her daughter to apologize for the impact the divorce had on her children.

“I felt it was my place to apologize for breaking hearts, for their broken home,” Kyzer said.

Jones, 37, stood up and looked at his ex as she testified but showed no emotion.

After killing the children, authorities said, he wrapped their bodies in plastic and put them in his SUV, driving aimlessly for nine days. He then left the bodies on a hilltop in Camden, Alabama.

Jones was arrested at a traffic checkpoint in Mississippi, where an officer testified he recognized a strong odor coming from the car as “the smell of death.”

Judge Eugene Griffith refused to allow photos of the children’s badly decomposed bodies in the back of Jones’ SUV as evidence. The defense wanted them shown, believing they would bolster their insanity defense.

Kyzer and Jones met in 2004 but after they married, he became rigid in his religion and demanding, she said.

“Women are to be seen and not heard,” Kyzer testified. “I was merely to take care of the children. To keep them out of his way.”

After they divorced, she gave him custody of the children because he had an $80,000-a-year-job as a computer engineer and a car. She saw them once a week on Saturdays at a Chick-fil-A restaurant.

With Post wires