If it's any consolation I do not think it is the onset of insanity. It sounds like anxiety to me. As I know from personal experience anxiety is frightening until you recognise it as such. Even then it's not a great feeling, but I've learned to take it as a warning signal that something is going in the wrong direction, be it at work (feeling stressed etc) or at home.
If this is what's going on then you need to take steps to reduce or eliminate or accept ( as the case may be) whatever it is that's making you miserable. Whether it's the being on your own or something else, only you can say.
Going out to be with others, at least some of the time, is a good thing. It is not merely a distraction but an end in itself.
Distracting yourself from feeling anxious can work (music, telly, a good book, socialising) but once you stop these activities, as I think you've already discovered, it may return.
Nothing to be frightened of but you do need to pay attention to it. Physical activity helps, not as a distraction but as a means of achieving something tangible which will make you feel better. If you think you suffer from depression please seek medical attention. It is an illness, not merely a state of mind and not subject to choice unfortunately.
_________________
I have traveled extensively in Concord (Thoreau)