If you mean that you literally are unaware of the sorroundings when you are walking, then it might be something called as "absence seizure" where you would just stare ahead and not do anything.
But if mean it figuratively and mean that you are so much lost in though that you don't notice the sorroundings, then it is a different matter.
causing tension, frustration, feeling sad/depressed and all these affecting your family and work life...looks like you are going through a tough phase psychologically. Please consult a psychiatrist
to see if you are depressed or just stressed.
The solution to your problems, depending on assessment, could be talking therapies (self help, CBT, family/interpersonal therapy
etc) or Medication.
Or else it oculd be that you might be helped by just talking to a doct about things in life in detail...beleive me 30%-40% of the benifit that a patient gets from any treatment is just purely due to talking to a doctor/psychiatrist.