When I’m going through a stretch of anxiety, it can feel like it will never end.

The negative speak running through my mind will never shut up. The pangs in my chest will never go away. I’ll be locked in a state of extreme discomfort forever.

And then, slowly — step by step — it starts to grow quiet, and I emerge in a place of healing and confidence with a renewed sense of self. This calmness always seems like a miracle.

It’s so exciting, in fact, that I often tumble straight back into the trap doors I just climbed out of. The feeling of being free from the weight of anxiety is so liberating that bad habits start to look good again.

So I indulge myself, stacking up little temptations one on top of the other, like a house of cards. And the strange thing is that I know it will collapse, eventually, under the weight of the anxiety that inevitably returns — but I do it anyway.

Here’s how it happens.

When a wave of anxiety has passed and I’m riding the rush of a renewed thirst for life, often the first micro-indulgence is ignoring my sleep routine.

I’ve struggled with insomnia for years, so my sleep routine is delicate, finely tuned, and subject to falling apart at the slightest deviation.

It starts with taking in an extra episode of whatever TV show I’m binge-watching at the moment. I know it’s important to give my eyes a break from screens before bed, but in my excited state of mind, the intoxicating glow of the laptop screen pulls me in, lulling me into a zombie-like state.

Instead of switching it off, dimming the lights, and giving myself an hour to read while I sip an herbal sleep tea blend, I stay glued to the screen for hours.

You’d think turning into a couch zombie for 2 hours before bed would be a good thing. But when I finally convince my brain to tell my hand to flip the laptop shut, and immediately hop under the covers and shut my eyes, my mind still races with thoughts about the characters in the show.

Couple this with a few drinks right before bed and I’m setting myself up for a night of tossing and turning.

That restlessness might burn a few calories, but it’s not going to relax my mind. It’s one small step toward backsliding into a bout of anxiety.

I’m highly aware of how important it is to give myself time to recharge. My friends joke that I’ve worn out the phrase “recharge my battery.”

As an extreme introvert, this is especially true. Hanging out with people doesn’t energize me, it zaps me.

But often after I emerge from a period of heightened anxiety — and the social isolation that accompanies it — my instinct is to fill up my schedule with social events. Despite being an introvert, I still want to socialize and spend time with friends and family when I have the energy.

A drink with a friend on Tuesday. A date on Wednesday. A concert on Thursday. Another date on Friday. (Why not go for two? I’m feeling good!)

Around Wednesday afternoon, a few hours before my date, my mind is feeling a bit fatigued from lack of sleep and a slight, creeping sense of anxiety. Naturally, I block the feeling out of my mind and decide to charge ahead into the date, the concert, and the rest of the week.

Maybe I even top it all off with a weekend lunch with my family, which inevitably turns into a disaster when my fatigued mind turns me into a short-tempered lunch goblin bent on complaining about the food and responding to good-natured questions from my mom with one-word answers — mainly “Nope!”

At this point I start feeling a growing sense of dread that a tiny ball of anxiety is sneakily building up. But instead of reverting to good habits, I double down.

Doubling down for me means fixing my fatigued mind with a heightened dose of caffeine and beer.

Caffeine to get me through the workday. Beer to numb my mind and lull it to sleep for a few hours (until I wake up with a full bladder and a restless mind).

These chemical aids actually seem to work for a few days. The more fatigued I feel, the more caffeine I drink to stay alert and the more beer I drink to coax my brain to sleep at night.

More coffee refills in the morning and teas in the afternoon, more lagers and pilsners and pale ales at night, more and more and more — until “more” loses its punch. Eventually, the restless nights and foggy days push me to the brink, causing me to crash hard.

When I’m stubbornly clinging to bad habits, I crash for a day and start the cycle all over again, knowing it’s a bad decision but denying it all the same. The sleepless nights and the jittery afternoons continue.

Somewhere I get the sense that the little ball of anxiety I felt the week before has snowballed into something more substantial and more dangerous, with increasing momentum.

In the midst of this orgy of bad habits, still clinging to a fading sense of post-anxiety joyfulness, I fill my body with junk. It’s easy to eat junk and most of the time it tastes great, too. Why take the time to cook a healthy, balanced meal at home when sugary carbs and greasy snacks are everywhere I look?

Burger and fries for lunch. Chips and beer for dinner. Fried chicken sandwich the next day. And on and on.

Caffeine also decreases my appetite altogether — a clever way, it seems in the moment, of side-stepping that responsibility of feeding myself. Beer fills me up, too, and sometimes it does double duty trying to help me fall asleep.

I currently live alone, so this anti-diet can go unchecked for weeks before I stop the cycle. And by then, it’s usually too late to stop the tidal wave of anxiety about to crash down onto me.

Under the weight of my unhealthy eating, lack of sleep, overindulgence, and caffeine-fried, beer-drugged state of mind, my house of cards collapses. An intense bout of anxiety follows.

I’m back to feeling anxiety pangs in my chest. I’m back to freezing mid-thought or mid-step, unsure what I was thinking or doing. I’m back to hyper self-awareness and never-ending rumination.

It’s a frustrating, yet all too familiar, state of being. When it happens, I’m ready to do anything to get out of it — even if that means ditching all the bad habits and starting fresh again.

Soon enough, I’m taking small steps to support my mind and body: less TV before bed, less caffeine and beer, less junk food, less overindulgence and exhaustion.

Slowly I start to feel better, my self-awareness gradually fades to confidence, and I’m on my way up again.

I’ve lived through this cycle many times. But I’ve learned from it, too: Moderation is my new mantra.

One beer with dinner can be just as relaxing as three. One Netflix episode instead of two prevents me from burning through a new season in a week, and gives me more time to unwind before bed. Life is usually just as fun — if not more so — and I’m less likely to fall into this self-defeating cycle.

I should also point out that my anxiety isn’t always triggered by bad habits. Sometimes I do everything right and, out of nowhere, a bout of anxiety hits me hard. Those are the times when I really have to dig deep to find a way through it.

It’s easy to feel like giving up. And sometimes I do for a while.

Those are also the most frustrating times to have a friend ask me, What’s wrong? What happened? What are you so anxious about? I wish I knew. But anxiety doesn’t have clear causes or simple fixes.

If you’re living with chronic anxiety like me, you know it often comes and goes seemingly at random. But you can help yourself by being mindful of slipping into bad habits and making an effort to strive toward moderation — even if it doesn’t always work out.

Steve Barry is a writer, editor, and musician based in Portland, Oregon. He’s passionate about destigmatizing mental health and educating others about the realities of living with chronic anxiety and depression. In his spare time, he’s an aspiring songwriter and producer. He currently works as a senior copy editor at Healthline. Follow him on Instagram.