All of what Polar said.

Plus this: in an area of struggle, make the task so small and easy first that he is able to succeed with it. Do it that way several times before increasing the difficulty, and increase it in such tiny increments that there is always some success in view.

It can feel ridiculous to give a gifted child a super-easy task, but if he's already deeply anxious and feeling unsuccessful, it really helps to start there.