The pop star, 24, credits his mum with helping him battle the disease when he returned to the UK after quitting the band back in 2015.
“Every area of my life was so regimented and controlled, it was the one area where I could say, 'No, I'm not eating that',” he told Sunday Times Style.
“Once I got over the control, the eating just came back into place. I came back to the UK and spent some time with my mum and got some TLC, and she cooked me food and I got back in touch, mentally, with a lot of the things I'd lost."
In his autobiography, Malik said that he would sometimes go ‘two or three days straight’ without eating while part of the band.
Malik was forced to cancel a number of public appearances and concerts last year because of anxiety.
The Pillow Talk singer says that he has now overcome his struggles with low self-confidence and panic attacks.
“I now have no problem with anxiety. It was something I was dealing with in the band,” he said.
“People saw strength in [sharing his experience publicly], and they didn't seem to expect it from a guy, but they expect it from a female, which to me is crazy. We're all human.”
Malik pulled out of his first solo appearance in the UK at Capital FM’s Summertime Ball last June, just minutes before he was due on stage.