I understand you very well. I used to have a pretty stable mood, but last months I think I'm starting to have this sort of problem. Just a couple days ago I've been on my way home late at night from a friends place, it was raining and I felt so awful that moment. All the thoughts consisted of pure concentrated loneliness, sadness and emptiness of my life. I thought I might just jump under passing cars because to me there was no point in continuing existing. The only thought that my sister will probably miss me kept me from doing that. Eventually I got home, ate something, had a tea and this horrible mood eased up a bit.
I think my mood is caused by loneliness. Usually hearing kind words from someone make me feel quite much better.
So I can assure that you are not alone who has this sort of problems, and having these mood periods doesn't mean there is something is wrong with you. It's just another shitty thing we all have to deal with.
I'm not sure though if someone can provide a solution for you apart from basic advice…