Since about 1990 the SSDI lists all persons that have died with a SSN that has regardless of age or if getting benefits. Since all children started getting SSN at birth in 1980's that means just about everyone, including "government workers". I had a mortuary, in early 2000s, tell me they are suppose to report all deaths with SSNs to SSA themselves.
Now there are still some Federal employees, hired prior to January 1984, who may have SSNs but their "retirement" is still under the CSRS for payout, and not Social Security. All other Federal government employees participate in Social Security like everyone else.
So if you are looking for someone who was a Federal worker and retired before 1984 than they will not be in SSDI. Have to contact the CSRS to see if they have or can provide any death information as I have never found any such "death index" like SSA's. Remember to cite the FOIA in requesting information from any Federal Goverenment Agency.