I do relate to that state of barely getting any sleep and then having a lost day. 2022 Dec was my worst month so far when it comes to sleep. I had a few weeks when I'd sleep for 1-5 hours for many consecutive days and then I couldn't function on those days at all. My performance at work really dropped. I took a sabbatical with the main goal of improving my sleep.
In January I went for 1 week to Morocco (I'm originally from Northern/Eastern Europe) to visit a friend, and my sleep was dramatically better there. I did take my sleep medication on a few nights, but still the quality of sleep was very different. It might have been a combination of psychological (foreign place, less stress) and physical (sun, movement/walking) factors, but the main lesson for me was that improvement is possible.
After going back to my home country my sleep returned to baseline (terrible), but over the last several weeks it's been improving. It'd take a lot of text to describe all the things I've tried during all those years.
One of my recent discoveries was that I probably wasn't consuming enough protein (I'm fairly physically active) and consuming too much fat. Changing that improved my sleep ~15%. Just being on a sabbatical and having no work related thoughts/stress improved my sleep maybe 20%. I'm also currently experimenting with Magnesium L-Threonate and Apigenin (I only started those, but I do seem to notice that I feel better the next day).
Your situation might be very different, but with this comment I wanted to say that your solution might be somewhere out there. Just don't lose hope.