If you set up a company you can pay yourself minimum wage for the hours you work (that would be taxed at 40%) and then take the rest as dividends, which are still taxed at that rate but include a "tax credit" so the effective tax rate is 25% - see eg https://www.gov.uk/tax-on-dividends .
If you are married you can also pay your spouse dividends (they can own 50% of the shares in the company so you split the dividends equally, or whatever other split you like), although be warned you cannot also pay your spouse a normal salary unless they are actually genuinely working for the company.
More info here: http://www.contractorcalculator.co.uk/salary_versus_dividends_limited_companies_advice.aspx
Also: if you are not experienced in this yourself then I strongly recommend you consult a relevant professional (accountant or small business advisor) to be sure you are not digging a hole for yourself. In particular you need to make sure you are outside IR35 rules - if you are inside IR35 you will have to pay yourself the money as salary and can't use the dividend option.