What you describe about feeling like you're not good enough and that someone will catch you out soon, is something that is felt by so many medical students, but it's a very lonely feeling, as people hardly ever talk about it. I think, if you polled the senior students / doctors here, you'd be surprised just how common that feeling is. Each year you make it through +/- resits, you think "this'll be the year they work out I'm an impostor here and somehow no-one ever does. Your fellow students all seem so articulate, so knowledgable, and like they have it all together, whilst you feel lost and a bit of a fraud. This feeling is so painfully common. You ARE good enough, and you CAN do this. You have passed first year. It doesn't matter whether you scrape through, or whether you're top of the class - the pass mark is there for a reason, that means that you have done enough. It can be hard coming from A-levels where you're used to being at the top of your class, to suddenly getting 50-60%.
Each year of medical school, I was always surprised that I managed to make it through. I usually scraped through with grades in the mid 50s (and more than once I got the exact pass mark of 50) - and had several resits to do. I was in the 4th quartile. When I passed Finals, I was so surprised - surely they should have caught me out by now. I think it was only when I had been a doctor for a year or so that I was finally convinced that I was meant to be there. And just to go back to what you were saying about deciles - yes ok, they do contribute to your Foundation application scores - but this system changes so frequently that it will no doubt have changed again by the time you get there - and it is still perfectly possible to get a decent job that's not completely in the back of beyond, and yet be in the 10th decile.
You have passed first year - and therefore you have done really well, whatever your marks - so be proud of yourself, and celebrate your achievement (says me who did NOT pass first year outright and did August resits - not everyone gets distinctions, even though it might feel like it sometimes). As others have said, making sure that you have other things in your life so that medicine doesn't become all-consuming, is important. And it sounds like you're doing a good job at recognising your specific strengths within medicine.
As I said already, I did more than my fair share of resits (first year, second year and fourth year) and finished in the 4th quartile. But I finished. And getting my Finals results and knowing I had done it was the best feeling ever. I've had some great jobs, in geography where I wanted to be, where I've learned lots. I'm fairly rubbish at physiology and I'm not great at teaching, but I'm good at keeping a level head in emergencies and doing good emergency management, and I'm good at communicating with patients and their families. I think I am doing a decent job at this doctoring stuff, and no-one has ever asked me what grades I got in medical school. You'll get there too - and it doesn't matter which half of the year you get there in, either. Best of luck and best foot forward.