Following because I’d love tips on this too! I’m the same way — all gung-ho for a few days then something happens and I skip a day or don’t do it perfectly and it all falls apart and I can’t get a groove back.
The most useful advice I’ve gotten around this is regarding self-care in general. A friend who is also a life coach told me it doesn’t matter if I do the same thing every day (work out, eat clean, whatever habit) so much as it matters that I make the conscious effort to do kind things for myself every day. It took a lot of pressure off me about sticking to new habits but it didn’t help me actually stick to any consistently!