Compustat has several footnotes that will help you track bankruptcy. If DLRSN ("Research Company Reason for Deletion") has a value of 02, it means the firm was 'deleted' from Compustat because of bankruptcy.
The COMPUSTAT data is structured into blocks representing current and back data in 20 year segments and 'header' type data in the footnotes are usually only in the first year of each block. Thus, DLRSN -- Research Company Reason for deletion will not be shown in the last year of the companies data as might be expected.
The date of deletion can be found in DLDTE --Research Company Deletion Date.
CRSP has a similar mechanism in its use of Delisting Codes. Although there are bankruptcy cases where the stock isn't delisted. In those cases, CRPS won't help you find bankruptcies.