Whilst you are in the bankruptcy I would advise against it as firstly the likelihood of getting a mortgage will be practically nil, and secondly if you actually got a mortgage I dread to think what sort of interest rate you would be paying.
When you are discharged from the bankruptcy, it will still be difficult to obtain a good interest rate on a mortgage, but you should have more joy in getting one. However - beware!! You are going to still be paying a horrendous interest rate. If you absolutely have to get a mortgage at this point, be prepared to pay a high interest rate, and consider remortgaging once the bankruptcy is off your credit file. It will take six years from the date of entry for the bankruptcy to be removed from your credit file. The date of entry of the bankruptcy on your credit file is usually around the same time as the date you go bankrupt.