Foundation seems to be loads of little questions, as opposed to higher, where many of them require a fair bit of working. But do know that a D isn't bad, and it shows definite potential, and a fair grasp for most [foundation] concepts. The first few questions from Higher pop up as the last few on foundation, so that might be where you lost marks. The most sensible place to start would be going through the papers that you have done, and going through as many questions as you can, recognising where you went wrong, and potentially noting as such, to prevent such an occurance again. If it was due to gaps in the method, or lack of practice, I'd recommend doing practice questions. Maths is a bit tricky in terms of revision, since it's not really a matter of just reading, then doing a bit of testing, it's a matter of learning a method and practicing the hell out of it, until you fully understand it and stop getting the questions wrong. How long is down to how much you currently understand, and how much you feel you need to allocate to get a topic completely covered.
Back onto the topic of problem solving questions, is it due to difficulties in conducting multiple-stage methods that might not be clearly set out, or is it actually thinking what method you should use? Both are understandable problems, that I had for a while with Maths. I started this year on a C, because I struggled with the way questions were asked. Now that I've had a load of practice, I now properly understand what questions are asking for. Most of the problems I have now are due to me overlooking the question, or simply screwing up on something simple. My pet peeve is forgetting to take note of signs, I have to review my calculations, and I ocassionally dismiss signs (-/+) accidentally. Checking your calculations is always a must, thus, especially in calculator exams. As such, don't chance using any sort of mental method in calculator exams, if you feel as if you would struggle. Even if you feel confident, I wouldn't advise it.
Do you have any textbooks? (ie. Edexcel's workbook) You can use those for practice questions, although some, like mine, may not be that useful for actually learning. In regards to actually learning, you should look at the
specification, and maybe mentally affirm whether you know a concept or not. If you don't, use sites like Bitesize to further understand the concepts. Once you've learnt a topic and are ready to practice it, practice materials can be found fairly easily. I tend to use OnMaths, which has several topic busters and mock papers that are extremely useful for practicing. The owner even has a few videos on his YouTube channel, walking through a few questions, so you might find that useful too.
But, overall, start by identifying what you struggle at, whether it be using complex functions of a calculator or doing mental arithmetic, then go from there!