Chronic migraines

I am trying to use a daily planner and stick to my plan no matter what. This has always been difficult for me. I am learning to be more structured and organized and therefore more productive with my days. It is not going well. In particular, I have chronic migraines that can incompacitate me for an entire day or longer. I often don’t get anything done that was planned due to this and then I think that I am a failure, feel discouraged and quit trying for a while. This is a viscous cycle that I would love to end. Any advice on how I deal with my thoughts regarding the circumstance of migraines and progress with my planner versus digress with my planner?