When you are coming back, arrange the EPA to assist you, they will take care of it. If you had renewed your passport in Thailand, usually your Embassy will give you a letter and with that letter, you go to the immigration and transfer your visa to the new passport, but since you are renewing it in your home country, I am not sure if your Embassy is aware of such a letter. I wouldn't worry too much as long as you get the EPA to assist you on arrival.