When times are tough at work and you don't know what to do, it can be for several reasons, so there is no one two punch to solving it.
For one, your difficulties might stem from not being on the right career track. It's hard to secure the next rung, when you're on the wrong ladder. Maybe your cycle of puttering out is a result of not connecting to what you're doing, and doesn't speak to an overall work ethic or inability to thrive in a work place.
Of course you can also be passionate about your job, but simply be burnt out. And with some recent failings, the best thing you can do is shut your mind down for a few days (weeks if possible). Taking a short time off is the reboot button for your brain. It allows your mental desktop to regroup. You may find once you're back the issue that was dogging you last week could either be very trivial or easily fixed.
Then there's the option of just sticking it out. Putting one foot in front of the other until you are clear as to why you are in a rut. Sometimes the source of an issue reveals itself when it's ready, not when we're asking. Sure it sounds hokey, and I just creeped myself out typing that, but it's true. Sometimes, the right action is not taking action.
Lastly, get some third party advice on this thing. Ask your peers, trusted family members or even your direct supervisors (if reasonable). Sometimes they can see habits or routines you fall into that are detrimental, but hard to notice when you're the one executing them. Maybe it's as simple as discovering your presentations are ill-prepared, or that your tendency to not wear pants on Fridays is, actually, not OK.
I might add that sometimes those sidesteps we take around obstacles feel like a step backwards.
For example, working a non-career related job, to fund tuition, to gain qualifications, to take a step closer to your goal.
It makes sense on paper, but can feel like a step backwards irl.
If you've planned everything, hang in there, don't forget your friends, and remember to let your hair out ever now and again.