The key I found was to avoid self flagellation.
Try your hardest to do each session, but if you miss a session don't try to make it up. Just get on and do a normal session the next time it falls due. You're in it for the long term, so long term it doesn't matter if you were intermittent when building the habit, or the occasional session gets missed for a reason.
This, plus start small. Just do those 5 or 10 minutes of karate exercises per day, at a fixed time, or 5 new flashcards per day.
I’m on this journey myself; learning to become more emotionally well-regulated, and kinder to myself. For years I had depression, and I used self-flagellation and self-loathing as drivers to motivate myself to do better. In work, hobbies, fitness, relationships…everything. I would unfairly criticize, disdain, and lash out in anger at myself, in ways I would never treat another person. My baseline emotional state skewed negative, and I’ve realized I was suppressing or dissociating from emotions entirely. It took a while to realize I wasn’t coping well. I made improvements over many years time, but sometimes still fall back into old default patterns. I finally hired a therapist to work through stuff and develop better emotional health and cognitive strategies. Started with just checking-in and recognizing emotions, and being more fair and kind to myself, which in turn helps to respond to everyday circumstances more objectively. It has helped immensely, and I don’t think I could have made the same progress without a neutral third party. I highly encourage anyone in a similar place to hire a therapist; it can be hard to find someone you meld with, but it’s worth it.