A A sudden change of circumstances can befall us all and sometimes at the most inconvenient time.
My first suggestion in this case would be to reach out to your local estate agent and ask them if they have any investors registered with them that would consider buying the property with the current tenant in occupation.
You would be surprised how many investors would be more than happy to do this. Your solicitor would ensure the legalities of this were taken care of and your agent would then draw up a new rental agreement with the new owner on completion.
If selling to an investor is not possible then the only option you have is to approach your tenant directly, informing them of your situation and offering them compensation for an early exit.
Perhaps offering discounted rent while the apartment is marketed for sale and then offering them a month’s free rent on their last month in occupation could be enough to entice them to agree to vacate earlier than the contract would usually allow.
Offering an attractive proposal to the tenants is paramount as you need them to co-operate if you are to have any hope of selling your property.