"It is against the law to drive, attempt to drive or be in charge of a vehicle when unfit, either through illness or from the side effects of medication." (From the NHS website)
Medications affect everybody differently, some people will suffer side effects from the whilst others won't. It would appear from the quote I have put above that it is only illegal if you unfit from side effects of medication. So...some people could take beta blockers and not be fit to drive, whilst others may be perfectly ok. I would assume that the doctors who prescribe beta blockers to people have to take this into account and will ensure that people understand the risks and that they need to see if they suffer any side effects before they drive.
I am not saying that using beta blockers to pass your driving test should be encouraged, obviously if you can find other ways of passing that would be better. Generally as well you should try and decide/work out what is making you fail, why are you so nervous? Rather than just resorting to medication to help you pass, but I don't see why people who passed first/second time etc should riddicule those who didnt and ended up finding other ways to 'help' them pass. At the end of the day, they did pass their test, if they hadn't been in a fit state surely the examiner would have picked up on that and they would have failed, they wouldnt have reacted as they should to something etc.
I passed on my 6th test, various reasons for failing, but basically it all came down to nerves. I could drive fine in lessons, but went to pieces on my test. On my 6th test I had a more laid back attitude (it was a day before my theory expired, and was a bit of a last attempt just for the sake of it), I used a mixture of kalms and rescue remedy and passed it pretty well. Whilst kalms and rescue remedy aren't 'medicines' I am assuming I would be one of the people that some posters are laughing at for needing to take things to pass their test, at my 6th go? I have been driving nearly a year now, and without meaning to sound like I am boasting/big headed I am a better driver than some of my friends who passed first/second time and still can't drive well. I am a lot more confident now and have driven several long journeys, used the motorways a lot etc, other people I know still refuse to go on the motorway.
Anyway.....I guess my point is, at the end of the day it doesnt really matter how you pass your test, or how many times it takes. If you are passed then you should be of a good enough standard, obviously there may be some exceptions that slip through the net. To the OP - keep at it you'll get there in the end!!
....and sorry for the long post, but some of the earlier comments really wound me up!