One step is to acknowledge that you're not supposed to be good at task switching. It takes a negative toll on everybody. Our brains just aren't very good at it. Because of this, your employer, if you have one, should take steps to minimize the amount of task switching required, or at least try to give you blocks of time you can dedicate to focused tasks.
That said, task switching is a practical reality, so coping strategies are important, too.
I've been practicing deep work since reading Cal's book just after it was released. Like any of the good habits it's a tough one to form and keep but the outcome can be tremendous. Deep work has allowed me crank on https://nanagram.co solo. I do one thing at a time. While I'm doing that task I'm basically disconnected from the world - No email, no messaging, no phone, nothing. I've got 2 kitchen timers on my desk: One set to 60min, the other 15min. I spend the whole day offline alternating between focused tasks for 60min and 15min breaks. I'm constantly surprised by how much I can accomplish with 40min still left on the timer. During the 15min breaks I stay offline. Using this approach of doing one thing at a time I find it's relatively easy to flow from one thing to the next. Unless I crack and get pulled into a network tool :)
For longer, 2-3 day tasks, I completely log off and don't connect to the world until it's done. This means avoiding any network tool through the evenings and mornings until the stretch is over. Easier said than done. Some of my family and friends think I'm weird or get frustrated by my inaccessibility. But they get over it.
After a 2-3 day deep binge like the OP I also face challenges moving from one discipline (say programming) to another (a marketing video). One tool I use is yoga. For a while I had a daily meditation habit going but it's been replaced with 2-3x / week hot yoga. I find it has a way of cleansing my mind and energizing me for the next thing. I also go on fat bike rides to unlock the power nature's constant stimuli has on your mind as Cal talks about in the book.
The acknowledgment that task switching is difficult when fully immersed in an existing focus that requires creative thinking has been an area of conflicting points of view in my current position as a developer, especially since I tend to play project manager and business analyst consistently in my projects. The tasks individually may not always seem that difficult from the surface, but they always seem to require the necessary attention to ensure they are resolved efficiently and effectively, which can be difficult when you’re trying to orchestrate everything while trying to make sure that one piece specifically is executed properly. I’ve been told that’s just how things go and there’s no getting around it so I’ve been forced to adopt my own strategies. My constant insistence that there are times that I will be working on one thing and nothing else unless the sky is falling has helped to a point, although the way this has often been executed results in me pulling an all-nighter so that I can focus without distractions. Reviewing my time sheets will show adjoining 16-19 hour days when I’m working on a large project just due to the fact that I’ve built up inertia and I know that may not last once a client issue comes up or a new project comes down the pipeline. It’s not all bad though and I somewhat seem to thrive to be honest. I think a lot of it just comes down to how you’re wired and having an employer that is able to sympathize with you.
I didn't know that Deep Work was a workbook for SGTCIY. In fact, I read Deep Work as a separate book. And I haven't yet read SGTCIY.
If you're interested in improving your productivity by simplifying your work, it is a good book.
But like all self-help books its effect wears off over time.
Keep in mind that Cal Newport is an academic at MIT. He has autonomy, he works in a field he loves etc. For other people his point of view is valuable, but his advice IMHO is not that easy to follow. You may need to improvise and find your own way.
That said, task switching is a practical reality, so coping strategies are important, too.
For help with that, check out Cal Newport's "Deep Work: Rules for Focused Success in a Distracted World" (https://www.amazon.com/Deep-Work-Focused-Success-Distracted/...). Full disclosure: He and I share a literary agent.