In case there is any such DTAA ( Double Taxation Avoidance Agreement ) in force with the country from which the income is received after deducting tax at source, then such tax deducted shall be considered under prepaid taxes.
Actually, the assessee need not bother about how shall he get the claim of the tax paid or what is the procedure of the same. All these matters are done at the Govt level. All the assessee has to do is to file the ITR . All the procedure and the conditions are mentioned in the DTAA between those countries.
note : as you said that you worked in uk for 4 months . you are deemed to be a resident in india