My heart goes out to you and your family for having to confront your brother’s illness and to make these heart-wrenching decisions. I pray for your brother’s refuah (recovery).
Most importantly, my condolences to you. May you find comfort in the days ahead and may your friends and community give you support as you move through your grieving.
You correctly identify the problem as a conflict between two important mitzvot: visiting the sick and escorting one to the grave. Both of these commands are included on the listing found early in the morning service which notes those actions from which we benefit in this world while the principle remains for the world-to-come.
You are faced with two equally weighty mitzvot and the tradition offers no guidance on how one might choose between them should that conflict arise, as it has for you. I am personally glad that the tradition does not resolve the question and leaves the question in our hands.
Let me turn from the mitzvot to you. I fully understand the desire to be able to do it all, but for many reasons that is not a realistic possibility. You need to make a choice which is necessarily personal.
I know people whose gut instinct is to be able to have one last visit while the person lives. They may have words that need to be said, they may need to hear a last word from their loved one, they may simply need to hold on to a memory of that person alive and responsive. The tradition cannot know if that describes you. If you are such a person, you should visit your brother while he yet lives.
I also know people for whom the most important moment will be to accompany their loved one to the grave. It is a way to show honor to your loved one. It is a place to speak with those who gather to pay their respects and share their experience of this person who impacted their life. It grants you closure. If you are such a person, you should defer your visit until the time of the funeral.
Neither I nor the tradition can sway the balance for you. That calculation resides in your heart. What I can tell you is that you cannot make the wrong choice. Your choice will express your love for your brother in the best way open to you.
May the Holy One comfort you among all those who mourn.