Try not to let this unfortunate situation bring you down to much to the point that you wont have the energy to study or lose that drive to really pass this second attempt of yours. Let this be a good reason for you to even try harder next time.
First of all look at your results and see exactly which area did you do terribly on. When I failed mine, they provided me a summary of how I did on my exam (they were organized in various categories).
Next find out what sort of questions fall under these categories and find out which things do you need to improve on. There is also the factor of how you interpreted and read the questions. The case studies can be a bit tricky.
Then, see exactly when are you truly READY to write the next exam. Do you need the course? I say try not to rush into your next attempt without thinking it thoroughly, you still have TWO chances left, DO NOT RUSH into it. There are various prep courses out there that are really good (and be prepared to spend at least $1000-I highly recommend those courses that reviews and does mock tests), that is if you think that you need the course.
A lot of us has been where you're at, try not to make the same mistake as me where I rushed into the next one to fast.
If you need some help feel free to message me, and SMILE...you still have a few chances to go (it does not make you any lesser than those that passed it the first try).