Unproductive routines?

So basically I didn't really realise it until the recent few years or so. I'm not diagnosed with ASD currently but looking to get assessed. 

Eitherway I do have issues with getting stuck into routines. Basically I find that if I have to do something different to my routine it causes quite bad anxiety issues. But the trouble is while I'm following my current routine this means that I'm not actually functioning properly and addressing the normal day to day stuff. 

What is the process of getting out of a bad rountine and introducing a more reasonable one and also a bit of time for spontaneous things that come up?