I am very sorry to know about this overwhelming reality your boyfriend has been facing for this long, and how it has deeply affected you and your relationship.
This situation is very frustrating, since as you said, no matter how many specialists you have consulted and have tested him not finding anything wrong at the physical level, he continues to experience this intense and chronic pain, which seems to deeply impact everything in his life, from mood to functioning and relationships. It also seems that he and the doctors have done everything possible to provide the best possible care for his physical-medical needs.
On the other hand, he has been suffering of depression from before this main pain problem, as well as of poor self-esteem. Your message seems to tell how most doctors have suggested how much of his physical pain could be of a psychogenic nature, which could make a lot of sense since in fact pain is a psychological experience, and we know how our mind could create or experience physical pain in so many different ways, depending on our mood, mental heal, level of functioning, personality and many other subjective factors.
You reported that he's been meeting his psychiatrist twice a week, been using psychiatric and pain drugs for a while but not showing any significant improvements around significantly and effectively reducing pain, depression nor self-esteem issues and poor functioning. I think these scenario is very common under such circumstances, once it seems he has mostly focused on using pain medication and psychiatric drugs but has not worked on the core personal - mental heal issues behind such symptoms, from depressive mood and everything that comes with it, to the poor sense of self-worthiness, poor coping skills and very limited functioning, all leading to deepen depression and any psychosomatic problem, as well as the experience of physical pain.
I think it is wonderful that he has finally decided to work on himself, but your words seem to point at your fears of him just using this decision to end the relationship or get away from you,a s an excuse to get even more isolated, so depressed and with a more limited life at multiple levels.
Only you know how painful and sad
it could be to be in your shoes, and unhappily there is nothing anybody in your shoes could do to change his reality, since this is about a hard an doing term work that only he can do. What you can do is to become a supportive, healthy and wise presence in his life, making your best to promote his awareness of reality, and proactive action to look for and commit to his rehabilitation process. By this I mean working on himself and core issues with psychotherapeutic support, including individual and group psychotherapy, addressing his self-worth-esteem issues, improving of coping skills, pain management and rehabilitation from depression and any anxiety
problem he may have.
It would be unrealistic to expect any significant improvement in his mood, experience of pain, socialization, functioning or at any other area, without him truly working on his rehabilitation from depression, anxiety and any other disorder undermining his life. Pain medication as well as most psychiatric medication are very addictive drugs, many times creating medical and mental disorders, problems and challenges, some times ever more serious than the original problems the client presented.
Once he starts working on his rehabilitation, then he would be able to take good care not only of himself, but also of his relationships, and that would give him a new chance to value what you developed together, and possibly to reconsider working on getting closer and continue sharing closer to each other. There is no way to know what would happen in the future, but this is what he you can do now to take good care of your present, and that would lead to the best results for tomorrow too.
I Strongly suggest you to consider individual counseling in case you find it very difficult for you to cope with this period, and all the challenges it may present. That way you would doing your best to take good care of yourself, and to offer the healthiest and most sound support to him. Obviously, it would depend on him, how much he allows you to continue playing a role in his life, and as frustrating as that may sound, there is not much anybody could do about that, but as you said, respect the boundaries and limits he set, trying to offer your best while hoping he could do choose and do his best in his own healing path.
Does it make sense?