In an interview with 'The Dr. Oz Show' the 38-year-old describes the months after their breakup as the time she got the most compliments, because she was so skinny, Us magazine reported.
Longoria said that she was not eating because she was depressed and sad, and her diet was coffee.
The 'Desperate Housewives' star said people kept saying that, "you look amazing. Divorce agrees with you," but she was like "I don't feel good. I have no energy."
She said that although it was a sad moment in her life, she wouldn't categorize herself as depressed.
Longoria, who realized later that something was wrong, went to her doctor to get some blood tests done and found that she was just depleted of every vitamin.
The actress recalled that her doctor said "it's as if somebody took a straw and sucked everything out of your body. You don't have any iron and your liver's overacting."
Longoria said that it was like all these things were physically wrong with her body, so she had to saturate with vitamins and get back on track.