I'm in the same boat as you op (failed comlex 1) but not the same situation; but I think our game plans need to be the same. Start with getting yourself into a good (mental health) place if needed, you can always improve and bring your scores up especially if you start studying now. Then, pick your number 1 FM residency and see what their requirements are and see if it's possible for you to meet them. I found my #1 FM residency choice, reviewed their website and saw that I met the requirements. I reached out to the program through email expressing my interest and wanted to know if they had any advice for an interested applicant. That program also offered elective rotations and you can best believe that I am working my behind off to get my CV, LORs, and application filled out so that I can apply for that rotation.
Next, don't assume you'll get that rotation spot. For me, there are 30 ACGME FM and only 5 AOA FM residencies in my home state, I emailed 15 of them that weren't on VSAS to see if they took 4th years (if they didn't have any info on their website) and only heard back from 3. 1 said no students, one offered me an application but I didn't meet their step 1 cut off so I might not apply, and the 3rd already reserved me for a tentative rotation.
Then, don't get your hopes up. None of the above is a guarantee that things will work out. I'm already planning and saving up for residency applications because, I know I'm going to have to apply far and wide in order to get a decent amount of interviews. And I don't plan on being picky where I'm applying. I had thought of applying to 200-250 programs but a physician I rotated with tried to talk me down to just the acgme 30 and we compromised with 100. I'll probably do more. When it's published, I plan on reviewing list of the 2018 FM AOA or ACGME programs that needed to soap for applicants and will add them to my list. Depending on how much time I have left, I'll just start googling "FM residency program board failure" and see which programs will accept multiple exam takes and will add them to my list.
After you get interviews and if you get a ton, then you can be picky about not wanting to live in a rural location but if that's your only option; you'll need to think about how hard it will be to participate in the match a second time.