I remember the day I decided to take the plunge and go freelance. It was 2015, I was in a full-time job I wasn’t satisfied with, and the thought of it stretching out infinitely in front of me felt stifling.

In my inbox was an offer of a short-term contract that would give me the freedom and flexibility I craved; I envisaged mornings spent cooking myself healthy breakfasts and jogging before starting work, revelling in the fact that every day could bring new commissions and challenges I hadn’t expected.

I’m one of the estimated 4.6 million freelancers in the UK and like many who dream of a career as a self-employed writer, I was seduced by the idea of working in rustic coffee shops, or from bed, with a cute fluffy dog by my side. The only thing I hadn’t bargained for was the reality.

I have an unhealthy relationship with social media as it is; I spend hours looking at people whose lives seem to be going much better than mine, sending myself into a spiral of self-doubt.

I’d been so seduced by the millennial, Instagram-ideal of freelancing that I hadn’t even considered the negatives

Going freelance meant my reliance on social media increased, and so did the pressure I felt to build my personal brand online. I joined Facebook groups for fellow freelance journalists and scoured Twitter for newsworthy ideas every morning. I began noticing other freelancers posting pictures of their published work on Instagram and worried: was I self-promoting enough? Are my tweets charmingly cynical, or actually just unprofessional?

I began to wonder if my personal brand screamed messy failure who still lives like a student rather than on-the-ball journalist brimming with good ideas.

I was six months into freelancing by that point, and the in-house contract I’d initially taken had finished. I was working from home full-time, and while I had enough work coming in to pay all my expenses, the lack of routine made me feel like I was spiralling out of control.

As a depression sufferer, this was doubly hard to deal with. What was meant to be my dream job was collapsing around me in a vicious cycle of sleeping in late, scrolling through Twitter only to see other young freelancers seemingly having more success than me, neglecting my diet as a result of my drop in confidence, and struggling to find pitchable ideas in the mire of my gloom.

Beating the slump

I’d been so seduced by the millennial, Instagram-ideal of freelancing that I hadn’t considered the negatives: sporadic and unpredictable income, a big reduction in human contact, and over-reliance on the internet to cultivate relationships and find work.

What I was feeling, it turns out, was far from new. A 2007 study of German freelancers in the media industry found “an elevated risk of poor subjective health among freelance workers who are exposed to adverse psychosocial work conditions”. The study found men were affected more, but I know through countless discussions on a Facebook group for female freelance journalists that self-esteem is a big problem for a lot of us. Every week or more, a group member starts a thread lamenting the fact she feels the need to apologise for asking for a higher rate, or that she shed a tear over a pitch rejection.

Pulling myself out of the slump began to feel possible when I realised a few things: that I wasn’t alone in feeling the way I did; that support was available on social media if I engaged in positive discussions; and a routine – something I resented about full-time work – was incredibly important.

Rather than letting my depression and negative feelings about freelancing feed into each other, I’ve made a concerted effort to control them both. I limit my periods of online procrastination to 20 minutes, I’ve stopped scrolling aimlessly through the Twitter feeds of people I envy, and I occupy myself while waiting for an important email instead of staring at my inbox and having anxiety-induced palpitations.

My advice for anyone experiencing similar feelings is to tap into your support network and voice your worries, whether that’s by talking to friends and family if they’re available, joining an online support group or through traditional counselling. Pay less attention to what other freelancers are up to; there will always be someone doing better, but envying them is a waste of time that could be spent pursuing your own goals.

Knowing when to take breaks is also vital; it’s always tempting to overwork as a freelancer, but I realised that taking on too much at once meant I wasn’t working to the best of my ability.

Sticking to a routine and getting up early can be a mammoth task when depression is also a factor, as even the action of peeling back the duvet feels like over-exposure to a cruel and uncertain world. Freelancing can be cruel and uncertain, but I’ve decided I won’t let it beat me, and I realise now that the internet can be my ally in that goal, instead of my enemy.

Looking for a job? Browse Guardian Jobs or sign up to Guardian Careers for the latest job vacancies and career advice