The law applicable to immovables is the law of the situs (lex rei sitae), i.e. the law of the country where the immovable property is located. This is important because this law changed after the annexation. Therefore, the mortgage may not exist anymore as a security. The lex rei sitae in regard to immovables is usually not subject to a choice of law agreement. Consequently, the law of the country of the creditor, which applied to the mortgage agreement is not applicable.
As far as the loan is concerned, the courts in the new country have jurisdiction over a claim for payment under the loan agreement and may apply the law of the country of the creditor and order payment. If you are unable to make payments, your house maybe subject to insolvency rules and sold, the proceeds then paid to your creditors.
The country of the creditor may also have jurisdiction, if you are still a national of this country and nationality is a ground for jurisdiction in that country. Assuming the property is your only valuable asset, a judgment in favour of the creditor needs to enforced in the "new" country. Whether this actually happen, depends on the law of the "new" country, and most importantly probably on the relationship between the two countries after the annexation.