I failed one portion of the ME exam. Do I have to retake both sections

You can retake just the section you need to pass. You still register for the full exam, but Pearson VUE will make sure that you just retake the section you need to.