The actress reveals she underwent treatment for "emotional problems"

After having endured a “chaotic” and “dysfunctional” childhood, Ashley Judd underwent a 47-day program at a Texas treatment center last February in order to deal with the issues of her past, including depression, isolation and co-dependent relationships, she says.

“I needed help. I was in so much pain,” Judd, who says she slept to combat depression and exhibited a compulsion to clean, tells Glamour magazine.

In recounting her childhood, Judd, 38, describes herself as a “hyper-vigilant child” who attempted to behave perfectly in order to compensate for her lack of security. She went to 13 schools in 12 years and shifted from living with her mother, her father and her grandparents.

“Supposedly, my sister was the ‘messed-up’ one, and I was the ‘perfect’ one,” says Judd, whose mother is Grammy-winning country singer-songwriter Naomi Judd and sister is Wynonna, another Grammy winner. Her father is her mother’s high-school sweetheart, Michael Ciminella. (Ashley’s parents divorced when she was four.)

It was during a visit with Wynonna, 42, while she was being treated for a food addiction at the Shades of Hope Treatment Center in Buffalo Gap, Texas, that counselors reportedly noticed Ashley’s emotional problems and approached her about treatment.

“They said, ‘No one ever does an intervention on people like you. You look too good. You’re too smart and together. But you (and Wynonna) come from the same family, so you come from the same wound.’ No one had validated my pain before,” says Ashley.

She denies tabloid reports that she was under treatment for eating disorders, “though I did take a look at my eating. Why wouldn’t I? I looked at everything else in my life under a microscope,” she says.

Of curbing her compulsive habit of wiping down plastic surfaces on planes and at hotels, Judd says: “Now I try to remind myself that if I engage in perfectionism, I am abusing myself.”

She also credits the stint at Shades of Hope as helping her 4-year marriage to racecar driver Dario Franchitti, 33. “I was unhappy, and now I’m happy,” she says. “Now, even when I’m having a rough day, it’s better than my best day before treatment.”

Plus, she says, she’s learned to take responsibility for her own feelings. “One of my favorite quotes is by Eleanor Roosevelt,” says Judd. That is, “No one can make you feel inferior without your consent.”