Hey Foreigner, sorry to hear you're suffering man. You've helped me out when I was in a very bad place before. I'm sure it must feel very dispiriting to find yourself back in a negative headspace.
There is no going back on a spiritual path. It isn't about feeling good all the time. We go through pain in its many forms so we can learn and develop. I don't say that in reference to some ephemeral afterlife, but to the life that's right here in front of us. You are supposed to feel doubt and to question everything in order that you may grow. The people who never do that never grow. Then they stagnate and they die never having glimpsed the real treasures of life. Rest assured you are not going to regress to this state on your own journey. You can't forget what you've learned; though it may FEEL cloudy to you now, that's only because you can't apply it to your present situation. That isn't bad, it's just adaptation. Life presents you with problems, you deal with them; it presents you with different problems, and you have to deal with them in different ways.
I know full well what it's like having nothing to occupy your time. It's just as bad as being too busy. If you want, I can give you half my current fairly crazy workload and we'll be in a perfect middle.
Your thoughts loop back in on themselves and foster anxiety. They have little else to imprint themselves on so it all turns into introspection. And not the good kind, but the kind that go nowhere, create problems and just generally makes it confusing and painful to be alive. So it's much like coming up on a heavy dose of a psychedelic, then just sitting around doing nothing. Fears generate out of this and then they feed off themselves and become stronger and stronger. This is why I go for a walk, draw something or meditate while coming up - there is little to no trepidation that way, and the principle is the same: make sure you have something to do other than just think.
So the answer is to occupy yourself, just as the obvious thing when you're too busy is to punch through the workload or reduce it. This isn't always possible - you may be in solitary confinement with nothing but a wall to stare at, or you may have ten kids and three mortgages to pay. Nor is it necessarily easy, even when it can be done. What I have found works is to commit to something with an outside incentive. In that situation, I would not attempt to write a novel, since that requires consistency and discipline, and you will find it much harder to maintain either of those when you're not busy. So go for something that's going to occupy a lot of your time, is meaningful to you, and regiments your day better than what you currently have. Doesn't matter what it is. I chose to go back to study this year, and while the timing's poor (I don't have money or enough work to pay the bills, and there are other stressors, so in some ways it feels like a nightmare), I don't regret it because it gives me focus and stability. Study is great if you can manage it. So if there are any degrees you've ever wanted, it's not too late to start. In many ways this is a golden stage, because you're NOT presently bound by things, so you can choose what is going to bind you.
However, it sounds like you feel the problem runs deeper than that. Of course things like your illness and the breakup can really throw a spanner in there. I brought up spirituality because you've related this to it yourself. I definitely agree with everyone who's suggested taking up meditation classes. Though as a suggestion, go into it with a clear intent. You get out of it whatever you put in. A businessman who does Yoga for an hour in the morning is not looking for enlightenment, the guy just wants to relax so he can think more clearly, which is entirely valid. But for people like us, I think the better application of meditation is simply to become more aware. Pick up the skill of being able to observe your own thoughts impartially and without attaching yourself to them. It gets more and more natural the more you do it. And (this is the part people sadly often miss) the meditation doesn't end when you open your eyes and stand up. In fact we are always meditating on something or another - it's just usually on how we're going to pay rent, or what is wrong with me, or any of the other stories the mind likes to tell - and we do not notice or seem to have any control over the fact we're doing it. So, my goal with meditation has always been to become more mindful throughout my entire day, from the moment I wake up to the moment I go to sleep. This has a tremendous impact on making stress more manageable, the clutter in my head clearer, and my general sense of spiritual orientation unobstructed by the ego. Try it.
One fear I used to have when people told me I think too much is, if I start meditating or otherwise occupying my attention, and learn to tune out all that incessant analysis of everything all the time... won't that mean I'm no longer focusing on my inner development? There's a sense of urgency towards many of these thoughts, it seems as though the questions need answering right now and there's an important reason for all this attention on them.
But this is actually the opposite of the truth, because by engaging more with the outside world, your thoughts actually become far MORE clear and no, you don't get lulled into some haze of automation. So meditating, becoming aware of your thoughts... is actually a way to make them MORE efficient and LESS confused. And overall, you are just more aware of what's really going on in your mind and body, which is an enormous asset. I do not think most people are truly self-aware, and they suffer constantly at their own hand for it.
It also helps to remember that whatever problems you're dealing with now are just superficial. They are manifestations of something deeper. Which, at the moment, you might describe as your general unease and depression. But in this way your problems are opportunities to resolve the deeper issues. To make yourself, for instance, better able to respect and love yourself even in the lethargy and aimlessness you're dealing with right now. After all, if all these problems went away, and everything was ideal, do you think you would be happy then? Probably. But eventually that tranquility will pass, just as every problem passes. And then you will be distressed again. Your problems are not an objective cause of misery. The misery is actually your reaction.
In this way you can never truly deal with the manifest problem until you have dealt with the underlying one. In my case, I am paralysed by stress these days. This is the least helpful reaction possible to it. I lose time and I lose energy. But I am realising that I cannot really do all the things in my life that need doing, until I am able to get past that core issue of wanting to escape my pain. The problems will come and they will go, they have done so many times in my life, and each time they have beaten me - I've run away. That will keep happening until I deal with my fundamental inability to be present with the suffering of it. Ironically, I CANNOT defeat it unless I give up on the pressing need to defeat it. In your case, perhaps the feelings of worthlessness that come from feeling unproductive in a very productive society are part of what's making you feel miserable. Are you able to accept that feeling, or do you need to escape from it? Accepting it does not mean you think it's valid, it means you've let go of the urge to control and change it. You will never escape from it as long as you do that, because by doing so, you are giving it energy. You are manifesting the problem, making it real and giving it power over you. Let go of the need to dominate that which dominates you, and you'll find it all levels out in the end anyway.
So reassure yourself, this is all normal and it's supposed to happen. You will be fine. Better than that, you are actually going to discover truly incredible things on this journey. Things unique to your own magnificent, intelligent, beautiful experience of life on this planet. That's what this is all about in the end anyway. From a certain perspective, having mental baggage to deal with is actually a GOOD thing. You can embrace pain and death as honoured friends, rather than wishing to slay them as your enemies. They aren't. Your only enemy is yourself.
They say you wouldn't know happiness if you'd never been sad, pleasure if you'd never felt pain. Not exactly. Pain is pain and it sucks by definition. Pleasure is pleasure and by definition it's great. You'd feel those things - you just wouldn't be able to appreciate them at all. Because they'd be all you'd ever known. But by feeling this dysphoria, you are making it possible to appreciate clarity and serenity in your life when it does come, in a way you never could before. This is wonderful. Embrace it.
One meditation that highlights this is to simply imagine there was no death, not even the concept of it. You are always going to be what and who you are, you are just never going to die. How does life look now? Well, it sounds like it would be safe, but any of it be worth much? No, it'd be worth nothing at all because it can't be lost. Therefore there's no reason to love, to care or even to engage. But we do have death, and it makes life precious, invaluable even. In this way, every moment you experience from the pits of hell to the peaks of heaven is divine ecstasy. And the same goes for any other duality - you would not appreciate the comfort of security unless you had experienced insecurity, clarity if you had not experienced confusion. You WOULD still experience security and clarity - they just wouldn't mean anything to you.
"My thoughts are clear, as always. Ehh, so what?"
or
"My thoughts are clear again. What a relief."
You ARE going to continue to suffer here. I am. We all are! There's no escaping it. The trick is to not feel despair when you do, as though something has gone wrong, and everything you accomplished to this point was moot. You were taught to think that way. Look around, it's not reality, every living thing is supposed to suffer, the starting point of Buddhism is "Life is suffering" and this is not pessimistic, it's simply what's undeniable.
So what's actually happening here is the contrary, you are breaking new ground. From what you've told me, understanding that is your way forward here. And it's a gradual realisation, so be patient with it.
I'll stop now because in all this time I could've kicked over an assignment, haha. I hope your illness isn't too lasting or debilitating. Sounds like it sucks. All the best with it, whatever it is it sounds at least very annoying to have to put up with.
Best of luck mate.