It's adapting the fanfic which was published in one of the New Voyages anthologies way back in the 70's.
Is it the one where Kirk is submitted to the Klingon mind ripper? And or does he flee into the past to cope with what happened? JB