There is much to be said on this topic but I'll keep it short as I'm suffering a bit today.
Pain changes your moods and changes your thought processes. It makes you snappy and you tend to cut to the chase and despise anyone spouting bullshit where otherwise you might have smiled and nodded fairly gently. Pain makes you want to cut parts of yourself away in order to keep the pain-free bits but there's no way you'll do anything as that would cause more pain. And when you're all said and done on pain you jump for the pain killers, which often contain codeine or other relaxants that induce sleep. Knocked out, you feel even less but time flies by and nothing is done in the process. In fact, dreams while you're on painkillers become almost useless as creative material as either you fail to remember anything coherent about then, fail to remember anything at all or have them constantly interrupted by bouts of painful awakenings.
Meanwhile, it is said that popping pills and the like will help creativity. The pain sufferer usually doesn't get such a benefit, losing creative thoughts and even waking moments to mind-numbing pain pills and the sleep that follows.
This, along with other various repercussions of over usage of pain pills, is the reason why, as someone who has suffered pain fairly chronically through half her life, I tend to steer clear of pain pills unless I'm just about at to loose my breakfast, lunch and dinner. Sleep is my main remedy and while I loose time I almost invariably wake up with good creative fodder and a mind clear enough to write it all down, or draw or paint or whatever.
Physical pain is incredibly intrusive on the mind, more than most realise until they experience a good bout of it. But pain is usually temporary, even for the chronic sufferers, as it fluxes and wanes its way through our lives. Our recognition of its impact will vary according to how often we feel it, as will our reactions. Man flu is the reaction to little to no pain through everyday life for rather a long period of time, followed by a sudden onset of various symptoms seemingly unmanageable but actually rather mild. The reason man flu is so annoying to many onlookers is that many of those onlookers suffer far worse on the average day and just want to kick the man flu sufferer for griping over a day that would otherwise be labelled rather good. The tired and unsympathetic reaction is normal for someone normally in pain. As is a depressed viewpoint and an open recognition of physical boundaries, limitations and weaknesses. The pain sufferer might be called a wet blanket as they aren't as bouncy or keen to go do something physically challenging but the reality is, if it is going to make the problem worse then being called a wet blanket is a small price to pay for avoiding more suffering, especially if you hurt yourself again.
Navigating physical pain to work is difficult because of its impact upon our minds. A mind fogged by either pain or pain pills simply can't churn out work to meet a deadline unless there is significant risk riding on not meeting it. And meeting the deadline in such a condition will inevitably run the sufferer into the ground and cause them to need time off later to recover. If the sufferer is lucky they can ride through it once or twice but they will inevitably collapse at some point or another. Forgiving yourself and explaining the situation to those who need to know is the best approach. Just because you feel pain a lot doesn't mean it shouldn't impact you because for you it is normal.
The flip side of this is that chronic pain sufferers can actually become incredibly desensitised to physical pain. Pain can go unfelt entirely if the level of pain a person is used to far exceeds the warning signal pain of a physical problem. If you're used to only feeling pain at the level of "My gut has been sliced open with a knife" then you simply don't feel any minor ache for "My tooth is slowly rotting". You only find out when you visit the dentist and they gasp in shock over the damage done and how you hadn't felt a thing. Desensitisation can impact up creativity too as it can whittle away you sympathy, empathy and understanding of how small, niggling things can change a person. On the other hand, you could write a damned good drama or thriller filled with incredible levels of pain and angst that blows everyone's minds, as long as you managed to make them understand that people can indeed feel this way and you're not over-dramatising (which is oddly what you think when you see someone whining away over a scraped knee or cut finger).
Now, to keep this short(ish) I'm moving on to mental pain. Mental pain is otherwise known as depression or angst or fear or anxiety or heartbreak. In essence the pain comes from either and internal (chemical imbalance) or external source (foods or victimisation), with an instigator that effects the thought process (someone told you you were fat even after you visited a gym for a month and put in heaps of effort). The pain is really the thoughts of a person tearing and ripping apart that person's own identity, self-worth and connection with others. You don't even need to see yourself as much to begin with in order to tear it all to shreds anyway. The mental pain you suffer is highly destructive to creativity as you actively tell yourself you can't do anything well and nothing you do will ever be appreciated all while cutting off sources of creativity through actively destroying relationships in order to justify your own thought processes (often an unconscious action, this one, so if you want someone to snap out of it go gently here while beating the self worth back into them).
As you can see, the problem with mental pain is that it is usually brought on by something uncontrollable or fairly hard to control but heightened by only the controllable. In fact, it is very easy to control your own mind when it is tearing at itself. If you think to do it. The answer is: You tell it to shut up. You repeatedly tell it to work hard to fix the uncontrollable enough so that you can function. And you actively do as you're told. And if necessary you treat part of your mind like a whining child with the other part of your mind that's far more grown up and wise and live your life using the wise side. It is perfectly fine to have an almost split personality if no one notices and it is functioning. Only if your life is badly effected by something does it need fixing. Go back to that rule: If it isn't broken don't fix it. Cracked isn't broken. Cracked is quirky. Broken is dysfunctional.
Mental pain, because of the tearing away of the mind by the mind, also leaves the sufferer with little to no energy to burn on such things as creative thought. It is far too busy destroying itself to care about creating. But sometimes, just sometimes, there is an opportunity for someone suffering mental pain to write it all down as a form of catharsis. By writing some of the emotions felt down, in a fiction story or a biography, the person can burn off some of that excess mental energy, think through some issues and find level ground within themselves. By burning off that energy there's also less energy to spend on tearing oneself apart and so the change can be permanent as long as the person keeps on being creative. The main issue for someone with the potential to write who's suffering pain is that they struggle to put pen to paper as the lack confidence. If you ever run across anyone in such a position then give them a heavy boot in the butt to get them writing. It might hurt a bit at first but they'll likely be better off for it. And if it is you, reading this, then get cracking damnit! Go, write.
So enough from me. I caught the time while my eyes and thoughts were clear and my hand wasn't shaking to write. Job done. And while my mind goes foggy again I'll be drawing up a cyborg lady. Then I might crash and go to sleep again...
Oh, and good luck. Tisn't a war that ends really. But you can win battles along the way and everyone loves to win.