You might, you might not.
Equity is the different between what the house is worth (or sold for) and what you owe on your mortgage.
So for example, you buy a house for £100k today with a £20k deposit. The £20k is your ‘equity’ because the house is worth £100k and you owe £80k.
In ten years time, you might have paid off £10k and the property value has increased by £10k, so your equity is the difference between what you owe and the property value - in this case, it would be £40k because you’ve gained £20k in paying off and in property value.
Of course, if property prices plummet and you pay off nothing, then you could end up in negative equity which is where you owe more than your house is worth.
The short answer to your question exact question is unless the market crashes again, yes you’re likely to get your deposit back. The years you pay the mortgage over is not relevant to this question, but whether or not you have an interest only or repayment mortgage is.