The federal budget deficit widened to $2.1trillion in the first eight months of the fiscal year, the Treasury Department said Thursday.