While doctors all swear to do no harm, a Southern Californian dermatologist broke that oath by allegedly poisoning her husband – who caught the whole thing on camera.

Yue Yu, 45, who treats patients at an office in Mission Viejo, was busted Thursday after cops served a search warrant on the couple’s $2.5 million mansion in Irvine.

Yu’s 53-year-old husband Jack Chen told police he had been suffering from an unexplained ailment for about a month.

“His condition became increasingly worse and based on the husband examining his routine and looking at what could be causing it, he grew suspicious of his wife and put a hidden camera in place that captured her poisoning him,” Irvine police Lt. Bill Bingham told The Post Monday.

Yu’s husband of 10 years — who turned over the video evidence to authorities – “sustained significant internal injuries,” but is expected to recover, police said.

Bingham declined to elaborate further or provide additional details of the alleged poisoning, citing an ongoing investigation. Detectives are still looking into a potential motive, he said.

“We do believe this is a domestic-related incident,” he said. “There’s nothing that we discovered that could cause concern for patients that [Yu] treated.”

Yu, whose bail was set at $30,000, was released from custody late Friday after posting bond, online records show.

Prosecutors were reviewing the allegations to determine whether to press charges, an Orange County District Attorney’s Office spokeswoman said.

Chen filed for an emergency restraining order in Orange County on Friday, claiming he was the victim of domestic violence, court documents reviewed by The Post show. A hearing had been set for Aug. 18.

He also filed for divorce on Friday. The couple have been married since July 2012 and have two kids, ages 7 and 8.

Chen is seeking sole custody of their children and asked the court to keep the kids away from their mom pending an upcoming court proceeding.

“Ms. Yu absolutely and unequivocally denies trying to poison her husband or anyone else,” her attorney, David Wohl, told The Post on Monday.

He wouldn’t comment any further on the allegations against his client, but said they have yet to receive video footage.

“She doesn’t plan to go anywhere near the accusing spouse right now,” Wohl said when asked about the request for a restraining order.

Yu is affiliated with Providence Mission Hospital, which issued a statement saying staffers were cooperating with authorities.

“The incident is a domestic matter which occurred in Irvine and we want to reassure our community that there has been no impact on our patients,” Mission Heritage Medical Group officials told The Post, while referring additional inquiries to cops.

Yu’s biography was apparently removed from the hospital’s website as of Sunday, the Los Angeles Times reported.

Staffers at Yu’s Mission Viejo office declined to comment when reached by The Post early Monday. Attempts to reach Yu and her husband were unsuccessful.

Yu, who attended medical school at Washington University in St. Louis, became a board-certified dermatologist in California in 2010, and was certified in micrographic dermatologic surgery in 2021.

She’s currently listed in good standing with the American Board of Dermatology.