A foreclosure will remain on your credit report for 7 years. I would recommend working on your credit score and saving for a subtantial deposit. Consult a trusted financial advisor at the bank you would like to use for a mortagage. Hopefully this will help you plan ahead for the purchase of your next home.
Wishing you the best of luck!