If mortgage company and ordinary bank are the same, that would be a help.
Otherwise, contact Mortgage company , enclose a copy of the cheque, explain the position ( i.e. this is a refund of money expended or you want to lodge it to the mortgage to reduce same or whatever as appropriate........). If you want all the money, ask them if you can lodge it to the mortgage account and then withdraw? or could they refund?
You will need to get in touch with them to work it out though.
mf