If i understood you question right, the Subsidiary is generating losses whereas the Investment turned to be Zero applying the Equity method of accounting with the Accumulated Losses.
In case the above was your answer, you should continue consolidating the subsidiary and continue applying the Equity method as per the below entry
Dr. Company Share in Subsidiaries Losses
Cr. Accrual against Losses in Subsidiaries (Instead of Investment)
And while elimination you need to eliminate the Accrual above (In Holding) as if your eliminating the investment against the equity in Subsidiaries;
Its like you are taking provisions or accruals against the losses of which the holding is responsible about towards it Subsidiaries
To de-consolidate, depends on the absence of the "substance over form" concept or in case the subsidiaries is governed or ruled by other parties or commission rather than the Holding in case of bankruptcy
Hope i made my self clear