One way to deal with floundering is to create structure. Zen Habits explains: Create Structure When You’re Floundering : zen habits
The other technique I do is to eliminate everything I am struggling with and do one small thing in a short period of time. Write it down. Repeat. Go as long as you can. Take a break. Repeat. Don’t examine everything you could be doing. Just put your head down and get one thing done. It may not be your best, but it is better than floundering.