Your Mum put the deposit down on the original house though, that was purchased before you met your ex. You stated that he only lived in this property for a few months before it was sold. You obviously didn't ring-fence this money, when you purchased the original house or your current house and your Mum didn't set up any legal contracts either. You probably should have given her deposit money back out of the equity when the original house was sold. You instead used all the equity within the original house to buy the current house with your ex.
I don't see how legally your ex is responsible for the deposit money on the original house. It's not his fault that money was never legally ring-fenced, that's an oversight on your part. However, I'm no legal expert, and you need to find out if your current home is sold, can the deposit money be paid back to your Mum, before any equity is split. He may have to agree to it, and personally I can't see him being very willing.
Your ex is on the mortgage and the deeds, he legally can force a sale or ask you to buy him out. My only other question would be....where is he currently living? I ask because unless he earns a huge amount of money, it's highly unlikely he's on the mortgage/deeds of another property, as well as your own. Yes, people can have two mortgages but they'd need to be able to afford both!!
This might be why he's now interested in the equity in your current home. If he's remarried, perhaps him and his wife want to buy a joint property together?
You need to seek legal advice urgently.