If your spouse didn't live in your home after June, you are "considered unmarried". Additionally, if your home was your child's, stepchild's, or foster child's main home for more than half the year, non-child dependents in your home don't qualify, and you paid more than half the costs of keeping up your home during the tax year, you may generally qualify to claim Head of Household filing status.
For custodial parent if you meet the qualifications to claim the child as your dependent, even if the other noncustodial parent is actually claiming the child as a dependent on their return, you qualify to claim Head of Household filing status.
"Considered unmarried" is not to be confused with filing status Single, hence if you are "considered unmarried" without a dependent child, your filing status should be Married Filing Separately.
Even if you were legally married as of December 31, you are considered unmarried (and therefore eligible for Head of Household) if all four of these conditions apply: