ESA is for anyone who can't work because of sickness or disability and aren't getting statutory sick pay (eg the self employed).
You need a sick note from your doctor and then you can claim:
contributory ESA if you have paid enough national insurance contributions;
or,
income related ESA if your (and partners I think) income and capital (savings) are low enough.
The citizensadvise.org.uk web site is very helpful, and more details are on the gov.uk web site.
claims are made through jobcentreplus and can be done by filling out a form or doing it (the same details) over the phone (0800 055 6688).
Remember that all your business outgoings (keeping van on road, phone and internet costs etc ) are still valid even though you are temporarily not working. Also if you do get ESA it is taxable and needs to be entered on your tax return.
Best of luck with a full speedy recovery.