Since you don't have a legalized contract, you can leave any moment. A legalized contract is the base for everything. If you have your passport with you which you should be having, then you can leave even without the company getting to know of it. They will get to know only after you have left Qatar. But if you still wish to play nice with them, just put in your resignation giving them a week's notice at the most.
Send it to them through your personal email as in that case you will have proof. Make sure you don't have any salary outstanding with them in which case you should resign or leave after they have paid your salary. Until then, just stay quiet about your plans.