When Shonagh Johnson, 33, lost her job and the flat that came with it, she ended up in a damp B&B with little money for food. She explains what turned her life around

Before I was diagnosed with autism, I really struggled. I was working and living in a pub in Edinburgh, but I couldn’t cope with the demands of the job and I lost it, along with my accommodation. From then on, I relied on friends, but I was worried that I was becoming a burden.

I managed to get a job with a charity that supports people back into work and education. I loved it, but the tension in my home life was affecting how I was at work. One day, I had a panic attack and an ambulance had to be called.

I approached the council for help. The accommodation they found me wasn’t great: a damp and decrepit B&B that took £98 from the £107 I earned every week. Any money I had left over went on laundry, so I had to choose between eating and clean clothes.

There are charities that will give free lunches, but they serve food only in the day, which is no good if you are working. The little money I had left, and the lack of cooking facilities, meant I had biscuits or bread and jam for most meals. I still felt homeless.

There was no social space at the B&B and I wasn’t allowed guests. I also felt unsafe – I was sharing the household with ex-prisoners and drug users and ambulances were often called for people who had had an overdose or self-harmed. The longer you are homeless, the greater the risk of becoming entrenched in that lifestyle. Part of the issue is that, after a while, your social life revolves around other homeless people.

I think what helped me avoid spiralling was concentrating on my work and surrounding myself with positive people. I was worried that things were not going to get any better, but a colleague at the charity helped me bid for social housing and I was eventually allocated a flat in Edinburgh. I was so happy. I recently swapped my flat in Edinburgh for one in London, where I live happily with my two children. When I was diagnosed with autism, it saved my life: without the label, I didn’t get the help I needed.

If you are worried about becoming homeless, contact the housing department of your local authority to fill in a homeless application. You can use the gov.uk website to find your local council

For more stories of life after homelessness, read Guardian Cities’ the empty doorway series

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter