1. Try the website
www.thetrainline.co.uk; you can buy tickets on your credit card. There will be automatic ticket selling machines.
2. Also, check out the site
www.railair.com. They operate buses between Heathrow and Reading, which is 40 miles west of London. You can get your train ticket at Reading--I notice that you can reach Yeovil Junction from Reading via Basingstoke.
Good luck.