Q. Should one fast on Tzom Gedalia if that may affect him and he maybe won’t be able to fast on Yom Kippur?

A. Poskim disagree whether it is better to observe the taanis now at hand and fast on Tzom Gedalia, even if that may cause not fasting on Yom Kippur, since that would be considered then a “ones” or being beyond one’s control and exempt of any culpability. (Sdei Chemed – M. Yom Kipurim 1: 10).
However, many Poskim maintain and recommend not to fast on Tzom Gedalia if that would jeopardize the fasting on Yom Kippur. (see Tzitz Eliezer 10: 25 and Piskei Teshuvos 602: 1).
Horav Shlomo Miller’s Shlit’a opinion is to follow in principle this last opinion, however a competent Rov should be consulted to verify the reality of the threatening medical condition.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a