"I will warn you in advance that this sounds hokey, but you can
train yourself like you can any other critter and it works surprisingly
well.
Get a big bag of your favorite small treat. Jelly beans, dove
chocolates, wasabi peanuts, whatever. When you start a work task, have
one! When you’ve spent a solid five minutes on it, have another! When
you complete the task, have several (this is what animal trainers call a
jackpot).
Do that for about a week, then drop the jelly bean you get just for
starting but continue to periodically reward yourself for working and
give yourself a jackpot for finishing. Gradually stretch how long you
work between rewards until all you’re getting is the jackpot at the end.
It all sounds silly because your upper-level brain knows exactly what
you’re doing, but you’re not dealing with your upper-level brain here.
Your tiny mammal brain is frightened, because it associates work tasks
with punishment. You’re slowly convincing it that in fact work tasks do
not mean punishment, they mean jelly beans! Tiny mammal brains love
tasty food, and you may find it easier than you think to get your tiny
mammal brain to relax."

I do something like this when I'm grading (using peanut butter M&Ms)- but without this structure. I'm definitely going to try it, though.