I had an experience pretty similar to yours, also in the second year of my PhD program. While my father thankfully survived, he was entering surgery with roughly 50/50 odds of survival. To compound things, I was the one with power of attorney that would have had to make any potentially life-threatening decisions on his behalf should he have been unable to. Needless to say, this all had me a bit flustered.
Here's what I did:
I knew the chair fairly well, and I also knew he was a really nice guy (he's jokingly called "The Nicest Man in the World" in the department), so I went to him first. This was at the beginning of the second year in the program and I still hadn't built up a close relationship with my advisor yet. He sat me down and shared stories, really tried to make me feel comfortable. He assured me that the department would be behind me and would support me in whatever way. Take however much time I needed, etc.
I did eventually tell my advisor who was quite sympathetic. but given that I was still in the coursework phase of my grad career, interaction with my advisor wasn't a huge part of my life yet. It was pretty clear what to do -- take the required courses and do well -- so his advice wasn't needed as often.
I only had one negative reaction, from the person I was TAing for. This professor was quite clearly irritated by my need to miss two weeks of classes, even though my co-TAs were covering my sections for me (the saints they were). But hey, 2/3 ain't bad.
Fortunately, my father's surgery went well and his recovery was quick. This enabled me to return to campus fairly quickly, in under two weeks -- and largely at my father's insistence. The whole situation, while terrible at the time, had very little lasting impact on my graduate career as far as I can tell.
My Advice to You:
Now, clearly your situation is quite different than mine was. It sounds like death is a near certainty here. I'm sorry for this. It also sounds like you might think you're having some worsening mental health issues. If it is available to you, I'd highly recommend seeking some sort of relevant medical help. Counseling or some sort of therapy may be appropriate, but I'm not a Doctor, so talk to one you trust.
On to the more plainly academic stuff: It seems likely that in order to deal with both your stress and family situation you're going to have to take some time off at some point. You would want to talk to the relevant person in your department and tell them as soon as you make a decision so that they can find someone to replace you if you, e.g., were assigned any teaching responsibilities that semester.
It seems reasonable to talk to your advisor so long as you have a moderately good relationship with them.
Who else should you tell? Tell anyone to whom you have obligations or responsibilities that you won't be able to fulfill. If you have a part-time tutoring gig, those need to be cancelled. Most things I'm thinking of can probably be cancelled without reason or the generic "family emergency". Only speak about your situation to the extent that you're comfortable to and that it helps you.
Assuming you do take a leave of absence, I would try to keep it as short as you reasonably can. If you can go back after one semester, great. If not, then try again at two. Always give advanced notice of your plans to return so there's a spot for you in whatever your research/teaching role might be.
If you're anything like me, after a while away from research you just have to do something. Do what you can on your own. Keep in correspondence with your professors. Don't let your time away be time when you're forgotten. This doesn't mean a daily correspondence, but check in every once in a while. As you're getting ready to come back you can let them know that.
Mostly? Don't worry too much about how others will respond and focus on yourself and your family. As many of the other answers have said, any reasonably decent person will understand and not hold your situation against you.