Derogatory items age off your credit report 7-1/2 years from the date of first deficiency (default). This is per the FCRA and nothing restarts this clock.
The older an item, the less impact on your score. By the time these items reach the 7 year mark, they have very little impact on your score. When the age off completely, there will be little if any difference in your score.
Since these derogatory items will age off in 2 more years, it would be very foolish of you to file bankruptcy. The individual items will still age off in two years,, but the bankruptcy itself would remain for 10 years and further damage your credit. Just let these old debts age off.
You will need to rebuild your score. If you don't have an open, active line of credit,,get a credit card, even if you have to get a secured card. Use the card, wait for the statement, and pay the balance in full every month. This will build credit and avoid interest. You need at least 24 months of consistent, on time payment history to see improvement to your score.