I'm not going to say the clichéd, "it's fine, you did all you could" etc, because I know how annoying it feels when you put a tonne of effort in and the exam isn't nice to you. First of all, try to see where you lost your marks. Is it all related to one particular unit/tiny section of the course? I don't do history, nor A-Levels in fact so unfortunately I can't be too specific but it's so important you know why you got something wrong. You mentioned you put in many hours, but maybe they were spent not revising your specification exactly. Make sure your revision is very tailored and really use your teacher for this to guide you for knowing what exactly to learn if you can. Secondly, don't think your predicted grades will not change. They most certainly can and WILL, as long as you don't lose motivation. A poor grade happens to the best of us at some point. It's not permanent. Good luck!