You will only need to declare your bankruptcy if the application form for the mortgage asks specific questions - which most actually do. If this is the case, just answer honestly. Being a bankrupt in the past generally will not affect your application generally, although you may have to pay a slightly higher interest rate.
As Melanie has said almost all mortgage forms ask if you have ever been bankrupt and it would be fraudulent to fill this in incorrectly, as Melanie said be honest as the years go on after discharge it will effect you less and less