I've been reading about people who have chronic conditions, some of which can be quite challenging. I'm currently going through something relatively minor myself.
But it got me wondering, for those living with a chronic illness (not necessarily terminal), how do you deal with the stress of it?
Since you cannot cure that illness, I recommend fixing everything in your life that you have control on and that might help you feel better.
Sleep well, eat a good diet, skip fast-food and alcohol when possible, etc. This won't cure it (don't listen to people that say it will) but it will make your overall life better. This will make it so that when the chronic illness hits you, you're at a more stable place.
Most of all, remember that it's not your fault if you fall down after doing your best. You have something that is external to your control and it's bound to win fights at time. Take the time to get better then stand up again. One day at a time.
If it is safe for you to do so, talk about it with your HR or your manager. They should understand that sometimes, you will be focused on that illness instead of workplace productivity. That's okay, that's how it should be. Trying to win both at the same time is how you burn yourself up.
There will be some unconscious bias against you, you'll need to play your cards well. Some people will try to support you yet come hard at you when you drop the ball. Remind them that you are doing your best and that the cause is out of your control, but don't waste your time trying to argue your way into changing their opinion of you. Some people will have empathy, others won't no matter what. Surround yourself with allies and built a support network. You may even meet other people that have chronic illnesses, and they will understand you the best.
I find that it's better to say as little as possible, you have the right to privacy after all. Your coworkers don't have to know the details of your life.
It's a marathon, really.