The walk from the nearest train station takes me nearly three hours. At first there are roads and footpaths, but finally I must strike out; through dense woods, across a footbridge over a river, up a steep, steep hillside, and over a moor. Penlan is not an easy place to get to.

It is late February, grey and cold. The clouds have settled over the hills. It will be at least a month before the first of the spring migrants arrive; even the curlews have not got back yet from the coast. But there are still the first hesitant signs of spring. Woodpeckers drum continually in the forest, the garden is adrift with snowdrops. My fruit tree has its first green shoots and the bullfinches have already come to nip them in the bud. The local pair of red kites are circling over the copse of oaks where they nest. Every now and then one will stall in mid-soar and drop into their nesting tree, like an arrow pointing straight to their nest. This advertisement is not for me, but for the neighbouring kites, circling in further skies.

I am tired when I arrive, but I cannot put my feet up just yet. The house is stony cold and before anything else I must get a log fire burning, that will burn for the duration of my stay. Then I must haul water from the well on the hillside below before darkness falls.

I first came to this cottage when I was 30 years old, and for five years it was my only home, through summer and winter, through sickness and health. There have been many books written about people moving to the countryside; they almost form a mini-genre of their own – back-to-nature writing, or escape-to-the-country. Some of them have been very good, and some… well, not so good. Almost all have the same narrative arc. A family abandons a successful career in the city to pursue their dream of a rural idyll. They buy a derelict farmhouse in a remote area and set about making a new life for themselves. There will be various obstacles to be faced, perhaps even some dark nights of the soul, but eventually they will overcome, or else presumably the book would never have been written. My situation was somewhat different.

During my 20s I spent more than five years travelling; hitch-hiking and sleeping rough or staying with people I met along the road, picking up work when and where I could. Mostly forestry work or field work; the kind of work where language was not much of an issue. Towards the end of the decade I washed up back in London, penniless, and ended up in a big squat with about 20 others, young homeless people and newly arrived immigrants. I signed up with an agency to get by, and found myself working mostly with teenage kids in care. It was an intensely social life. I had no idea what I would do next, no plans for the future, I was just marking time. And then I was made an offer of the tenancy of a cottage without services high in the mountains of mid-Wales, for a peppercorn rent of just £100 a year.

I think I saw it as a challenge; almost as an extension of the challenge of the kind of hardcore travelling I had been doing for years. I would learn to stay still, I would learn to be alone. Perhaps like Thoreau 150 years before me I wanted to know just how little I needed in order to lead a fulfilling life.

Neill's cottage in Wales. Photograph: Neill Ansell for the Observer

My book, Deep Country, is an account of the five years I spent in the hills, of how I lived and what I lived for, of how I learned to become self-sufficient in every sense of the word. Not just in terms of growing or gathering almost all of my supply of food, but in terms of relying entirely on my own resources. I was never bored; there was always too much to be done. Chopping wood, fetching water, foraging. Weeding, walking, watching. This is a book about nature and landscape, but it is also a book about what it means to live a life so remote that you may not see another soul for weeks at a time. No neighbours, no vehicles, no phone. It was possible to walk west from the cottage for 20 miles without coming to another house or a road.

What I found was not what you might expect. You might think that such protracted solitude would lead to introspection, to self-examination, to a growing self-awareness. But not for me. What happened to me was that I began to forget myself, my focus shifted almost entirely outwards to the natural world outside my window. It was as if we gain our sense of self from our interaction with other people; from the reflection of ourselves we see in the eyes of another. Alone, there was no need for identity, for self-definition.

The process was a gradual one. During my years in the hills I kept a journal. For the first year it is a conventional diary; places I had gone, things I had done. By the second year it is little more than a nature journal; what birds I had seen that day, perhaps some notes on the weather. By the third year it is no more than an almanac, marking the turn of the seasons by the comings and goings of migrant birds and their nesting dates, interspersed by the occasional detailed depiction of a moment, perhaps the flight of a single bird. I am an absence, a void, I have disappeared from my own story.

I could have stayed forever; becoming, no doubt, steadily more reclusive and eccentric. I had the measure of this life now, it had long since ceased to feel like any kind of a challenge; this was just me living the life I had chosen. What led me away in the end was a visceral, almost bodily, craving to have children, in a way that is rather expected of women but less so of men. And though it seemed unlikely, I was to meet the woman who would become the mother of my children while I was still living at the cottage, on a trip to the wedding of mutual friends. It must have been something of a leap of faith for her to take on a long-distance relationship with someone leading such an uncompromising life, a life so different from everything she knew – but she took it anyway.

Two years later, after five years at the cottage, I left the deep country, threw myself back into the world of other people, and before long started a family. There was a certain amount of acculturation required on my part; in particular I found the constant need for conversation a challenge. I quickly found myself working with homeless people. My day would be spent in a room filled with 20 or 30 people, all of whom wanted a piece of my time. There would be disputes to resolve, fights to break up, medical emergencies, one crisis after another. And always there would be people that needed to be talked to. Sometimes one of them would comment that I seemed rather quiet. And in the evenings I would return to my home life, that of a first-time parent of a newborn.

It was a full life for someone who had become used to complete control over their days, and I would always value those brief snatched moments of calm that can be found in any life if you look hard enough for them. Yet though in the years of solitude I could not honestly say that I had learned to know myself in any overt sense, my time in the hills had left me with a core of peace and I was deeply comfortable in my own skin. I took on greater and greater challenges in my working life. Nothing seemed too much for me to try; if I could manage that, then I could manage anything. If I took a risk and things didn't work out I knew I had inner resources that I could fall back on.

My lifestyle is very different now. I live in a flat in town, a five-minute walk from the sea, with my two daughters. My children look forward to our occasional visits to Wales, but I always try to arrange my life so that every now and then I still get the opportunity to visit the cottage for a little alone time. When I get there I bring the busyness of town with me, and I rush around looking for storm damage, checking to see if the mice have breached my defences and raided my cache of food, checking my wood supply, my water supply. But when darkness falls and I light a few candles for the evening and put my feet up by the fireside, the scales of society fall from my eyes, and time slips away.

In the morning I rise with the light and set out to visit the ravens. They are the early birds, the very first to nest. The site they have chosen is absurdly beautiful, in a tiny copse of trees on the sheerest slope of my mountain, looking out across the valley at the hills beyond. They have chosen the same tall cedar to nest in for more than 20 successive years to my knowledge. These are long-lived birds and it's quite plausible this has been the same pair throughout.

As I come into view, the pair fly out and over my head, calling to let me know they have spotted me. A drifting buzzard approaches a little too close to the nest and they gang up to drive it away, mobbing it relentlessly in pincer formation. The buzzard doesn't stand a chance. Then the pair circle back. First one, and then the other, flips over on to its back and flies upside down, in display, in celebration. It's good to be back.

Deep Country by Neil Ansell (Hamish Hamilton, £16.99) is published on 7 April. To order a copy for £13.59 with free UK p&p, go to guardian.co.uk/bookshop