It’s a riddle wrapped in a conundrum how “Mystery Girls” star stays alive on such meager fare  – top docs deduce WHY.

Tori Spelling is consuming only a meager 500 calories a day, say sources, and friends fear the extreme diet could kill her!

“It’s completely insane behavior,” a longtime friend tells The National ENQUIRER. “She’s barely eating anything.

“There’s not an ounce of fat on her, and it looks like her body’s going into starvation mode from lack of nutrients. Everyone’s convinced she’s punishing herself in some way because her self-esteem has taken such a beating.”

The mom-of-four, 41, has been battling to save her eight-year marriage to Dean McDermott, 47, after he was caught in a two-day romp with Emily Goodhand, 28.

Still, Tori insists the marriage is back on track.

“We’re working on things,” the former “Beverly Hills 90210” star said in July. “We’re committed to being a family and moving forward and that’s what we’re trying to do. It’s day by day.” But multiple sources believe she’s in denial, and wasting away as a result.

“Her kids eat more than she does,” the ENQUIRER insider added. “It’s like she has a phobia about food. I think she’s lucky if she gets 500 calories a day into her. She’ll have a juice and a decaf coffee for breakfast, and a piece of fruit for lunch. Dinner is a child-sized meal that’s 25 percent protein and 75 percent vegetables.”

Tori also drinks eight liters of water a day, flushing away any nutrients, the source said.

“She’s getting that belly bloat that you see on starving African kids,” added the source. “If Tori doesn’t stop right now, I’m afraid she could be doing her organs permanent damage.”

A top medical expert agrees. When the body doesn’t get enough nutrients, “it starts eating its own muscle for nourishment,” said Dr. Gabe Mirkin, a Florida weight loss expert who has not treated Tori. “You run the risk of heart damage and death. Blood sugar drops, and you can pass out.”

Friends say she’s constantly nauseous, tired and cold, and is starting to lose her hair. “Tori’s putting herself at risk,” said the friend. “I don’t think her body can take much more.”