People consistently underestimate how much less competent they are when they are unhappy.
Sam mentions a pattern which applies to me, but I was unaware was so general:
Like most people, I sometimes go through periods of a week or two where I just have no motivation to do anything (I suspect it may have something to do with nutrition). This sucks and always seems to happen at inconvenient times. I have not figured out what to do about it besides wait for the fog to lift, and to trust that eventually it always does. And I generally try to avoid people and situations that put me in bad moods, which is good advice whether you care about productivity or not. - Productivity, Sam Altman
Ireland has the misfortune of being one of the countries with the least amount of sunlight hours.
Sometimes, the lack of sunlight can be really demotivating. So far, what I've found that works is keeping a journal with a list of sequential bullet-pointed tasks for your day, so that there is never any doubt about what's next. The smaller the tasks are the better.