The word “EXIT”
Line 1: “My head and tail together” refers to the letters “E” and “T”. When combined, they make “ET” which means “extraterrestrial”, or a being originating from a place other than the earth, or “from a distant home”.
Line 2: “My middle” refers to “XI”, or the number eleven in Roman numerals, used “in ancient Rome”. This is a “prime number”.
Line 3: “My first half” refers to “EX”, which when used as a prefix indicates a former title, status, etc., i.e. when it is prefixed it makes “something” “used to be”.
Line 4: “My second half” refers to “IT”, which is an abbreviation for “information technology”. The IT department makes your “laptop virus-free” when you call them at your place of work.