When you say you "overstayed your visa", do you mean you overstayed your status as given on your I-94? (US visas are solely for entry and do not have anything to do with how long you can stay.)
If it was more than 1 year from when your I-94 expired to when you filed I-485, you triggered a 10-year ban when you left the US. This is because you trigger a 10-year ban when you leave the US without Advance Parole after accruing more than 1 year of "unlawful presence". You start to accrue "unlawful presence" when you stay past the date on your I-94, and it stops accruing while your AOS (I-485) was pending.
Your AOS (I-485) is abandoned, but your I-130 petition remains processing. Since you are outside the US, you would immigrate by Consular Processing for an immigrant visa at a US consulate in your country. You should inform USCIS that when the petition is approved, you want it to be sent to NVC for Consular Processing, and not stay at USCIS for AOS. (You might have to file I-824 to do this; I'm not sure.)
Your immigrant visa will be denied since the ban is not over. You can apply for an immigrant waiver for this ban with I-601. It will require that you show that your US citizen or permanent resident spouse or parent will suffer "extreme hardship" if you can't be in the US. You have a US citizen spouse, so if you can show they will suffer "extreme hardship" if you can't be in the US, you can get the waiver, but "extreme hardship" is hard to prove.