Mental hospital spends £1m in failed planning bid