It depends on lots of factors including the length of marriage. Every case depends on its own facts.Assuming you're in the UK [I assume for this purpose that you speak of yourself.If so you'll need a solicitor], the court can do what it likes with your house and the proceeds of it because it's part of the matrimonial property.It doesn't follow that because its in your name alone, you paid for it and you owned it before your marriage, you can keep it as if you'd never married, without his having any rights to any of its value. His bankruptcy does not really change that principle.His present financial state can't remove all his rights.You may be told to pay him maintenance or some lump sum instead of maintenance or maintenance and some part of the equity in the house, who knows?Anything is possible because it depends on the facts of the case,, which dictate the decision.
[Before 1882 you'd have lost it on marriage, since all the wife's property became the husband's on their marriage. That never seems much of a consolation, somehow!]