How To Maintain Good Habits Despite Emergencies

As you know, unexpected things and events happen. Either at work, at home, or just plain bad luck.
When we get thrown off our habits due to an immediate (but recurring) need, we tend to blame ourselves. We think that we should have done the habit, despite our shifted priorities at that moment.