Be aware that mental health diagnoses like depression and anxiety may occur concurrently with chronic conditions and chronic pain. The word co-morbidity would apply here. And I can say from my own personal experience as a psychotherapist that many of my clients living with chronic conditions and chronic pain do indeed have a dual diagnosis of their chronic condition and a mental illness diagnosis, especially depression.
At this point you might be tempted to ask: Are you trying to scare me, Dr. Gary? The answer is no, not at all. But I do want to emphasize the importance of identifying any isolation and loneliness you may be experiencing and, most important, doing something about it .https://justgotdiagnosed.com/resources/loneliness-isolation-your-mental-health/