Legally separated is defined in each state's laws. Usually, it requires a signed court order.
If you are not legally separated or divorced, you have three possible filing statuses. You can choose Married Filing Jointly, if you both agree, Married Filing Separately if you don't or Head of Household if you have a qualifying child and lived apart from your spouse the last six months of the year.
Head of Household
You may be able to file as head of household if you meet all the following requirements.
Qualifying Person
See Table 4 to see who is a qualifying person. Any person not described in Table 4 isn't a qualifying person
From <https://www.irs.gov/publications/p501#en_US_2017_publink1000220814>