I managed to get through my teen years with minor zits and blemishes. So, by the time I turned 20, I thought I was good to go. But at 23, painful, infected cysts started developing along my jawline and around my cheeks.

There were weeks when I could barely find a smooth surface on my skin. And despite the new face creams, acne cleansers, and spot treatments, nothing stemmed the appearance of new acne cysts.

I was self-conscious and felt like my skin looked horrible. Going to the beach in the summer was difficult. I constantly wondered if my cover-up had come off to reveal some nasty blemish. It wasn’t just an aesthetic issue either. These cysts felt like hot, angry infections growing more and more irritated as each day went on. And on humid summer days in Buenos Aires, Argentina, where I live, I would crave washing my face the way you might crave food after fasting for a day.

Evidence is mounting that acne can have severe effects on people’s quality of life, similar to the damage caused by serious skin conditions like psoriasis. And it’s not just a teenage issue. According to the Journal of the American Academy of Dermatology, acne affects as many as 54 percent of adult women and 40 percent of men over 25 years of age.

And cystic acne, as I can attest to, is much worse. The oil and dead skin cells build up deep in your follicles and cause a boil-like infection. Competed with other types of acne, cysts get the title “lesions” and the additional symptoms of pain and pus. The Mayo Clinic defines this type of acne as “the most severe form.”

Two years ago, I learned about The Whole30, a diet where you only eat whole, unprocessed foods. The goal is to help you discover food sensitivities and improve health. I originally decided to take on this diet to get to the bottom of some stomach aches that plagued me. I was eating mostly what I thought of as “healthy” foods (a fair amount of yogurt products and only the occasional cookie or sweet treat), but they were still affecting me.

Magic happened during this month of eating whole, unprocessed foods. I made another fascinating discovery as I reintroduced the foods I’d eliminated. A day after having some cream in my coffee and cheese with my dinner, I could feel a deep infection beginning to form around my chin and decided to do some research. Over the next few hours, I pored over articles and studies, first about the relationship between acne and dairy, and then the relationship between acne and food.

I found recent studies that suggested hormones in dairy products may contribute to acne. In one of the largest studies, researchers asked 47,355 women to recall their dietary habits and the severity of their acne in high school. Those who reported drinking two or more glasses of milk per day were 44 percent more likely to have suffered from acne. Suddenly everything made perfect sense.

Of course my skin reflects the quality of the things I put in my body. It may have taken far longer than 30 days for my skin to clear up completely, but those 30 days gave me the freedom to understand the relationship between my diet and body.

I also stumbled across an article titled Acne and Milk, the Diet Myth, and Beyond, by dermatologist Dr. F. William Danby. He wrote, “It is no secret that teenagers’ acne closely parallels hormonal activity … so what happens if exogenous hormones are added to the normal endogenous load?”

So, I wondered, if dairy has extra hormones, what else am I eating that has hormones in it? What happens when we add extra hormones on top of our normal load of hormones?

I started experimenting again. The diet allowed eggs, and I had them for breakfast almost every day. For a week, I switched to oatmeal and noticed a clear difference in how my skin felt. It even seemed to clear up faster.

I haven’t eliminated eggs, but I do make sure to buy organic ones with no added growth hormones and eat them only once or twice a week.

After a month of my new eating habits, my skin was still far from perfect, but I no longer got new cysts forming deep under my skin. My skin, my body, everything just felt better.

The first course of action for acne is usually topical treatments like retinoids and benzoyl peroxide. Sometimes we get oral antibiotics. But what few dermatologists seem to advise their patients on, however, is prevention.

In a 2014 review of diet and dermatology published in The Journal of Clinical and Aesthetic Dermatology, authors Rajani Katta, MD, and Samir P. Desai, MD, noted “dietary interventions have traditionally been an underappreciated aspect of dermatological therapy.” They recommended including dietary interventions as a form of acne therapy.

In addition to diary, highly processed foods and foods high in sugar could be causing acne. For me, my skin is amazing when I limit or avoid dairy, eggs, or processed carbohydrates, such as white bread, cookies, and pasta. And now that I’m aware of what affects me, I make sure to eat foods that won’t leave me to deal with nasty cysts and months of healing.

If you haven’t looked into your diet, it might be worth looking at what you are putting in your body. I would encourage you to work closely with your dermatologist, and preferably find one who is open to talking about prevention and finding solutions through dietary changes.

My skin has drastically improved (after nearly two years of trial and error, changing my diet, and working with my dermatologist). While I still get a surface pimple here and there, my scars are fading. And more importantly, I am infinitely more confident and happier about my appearance. The best thing I did was to take a close look at my diet, and be open to taking out any food to make my skin the priority. As they say, you are what you eat. How can we expect our skin to be an exception?

Keep reading: The anti-acne diet »

Annie lives in Buenos Aires, Argentina and writes about food, health, and travel. She’s always looking for new ways to be healthier. You can follow her on Twitter @atbacher.