First off, take a day to relax, take deep breaths and realize this isn't the end of the world.
Next, you need to retake and pass ASAP. This is going to hurt, but the sooner you get a Pass, the sooner you'll be able to get interviews, and the more likely you'll match. A lot of places don't accept a failure in the PE, but some might say it and be ok with it if you've passed since then.
Study hard, prepare, and contact the NBOME about extra spots for people that have failed. Periodically spots open up the same week, so I would try and be ready to take it anytime. You should check the schedule daily for spots opening up.
If you pass it early enough, it might not hurt you too bad. ACGME programs begin to accept apps on Sept 15th, and many don't review until Oct because of the MSPE/Dean's letter. If you can take it in the next couple months, you might get a decent amount of interviews all else being good. Also, I would reach out to affiliates and any advice you can get from mentors/PDs.
I don't know how much support your school offers, but they might have a policy about retaking it. They might give you a review, or at very least they might make you jump through hoops before retaking, and knowing those hoops now is much better than being caught off guard. Try your best to stay on-schedule if you can so that you can start residency July 1st.
Also to be clear, in your situation I would apply broadly, more broadly than you initially anticipated, and I wouldn't skip the AOA match unless you've got tons of ACGME interviews.