Hi
I am afraid you are out of luck. This same thing happened to me in a lab but luckly for me the box was siting on a desk near me so I could console in. Unfortunately, since you ran over your working config with a template and broke the control connection there is no real way to connect but to ask someone to configure the router via a console. Note that when control connections are down router will allow you to make changes to configuration even if managed with config templates (vManage mode). However, it will run over the config as soon as control plane is re-established. So make sure to fix the template before you go and fix the configuration on the router.
Also, make sure to use rollback timer on the page before you click continue to deploy the template. This way the router will rollback if the control connection is lost.