In my opinion, these feelings of depression, loneliness, heartbreaks, and etc. are mostly due to spending too much time thinking about what others think of you. Another possible reason is that people might not have anyone to go to when feeling down.
For me, I have experienced over-thinking of what others think of me. I constantly ponder to myself, why someone is not replying my text, or why he/she doesn't seem to respond or just seem to be giving me the cold shoulder. I always blame myself when these situations happen. When I think a friend is angry at me, or if I did something that irritates others. I spend too much time thinking of these things, instead I should focus on more important things like studies and rest as well as entertainment. But sometimes the problem is that saying sorry to the person you might have offended is also important. So I usually end up saying sorry to almost anything that I think I might have done wrong. I'm afraid to lose my dearest friends and become faced with loneliness again.
The other reason for some of my depressions is not knowing if I should consult someone on my issues. Sometimes I think I'm too narrow minded. When I consult someone, I just want things to go my way. But other times I just want to live with it and think to myself: "Life is unfair. Just live with it. There's always a reason for it." But this might just drag on the suffering or that situation, whatever it might be. But sometimes it really helps to bottle the feelings up and keep them to yourself. Sometimes you might just get used to it and ignore the negative side of those things, and accept them to be like more paperwork that you just need to do no matter what. You might accept it just like we have to accept that we need to pay money to get something. So I do not have a fixed solution to depression, heartbreaks and etc. Sometimes I do consult, other times I bottle them up and accept the pain and learn to live with it.
*Disclaimer: As I am always changing my views depending on mood(or what just happened recently) or sleepiness, please do not make rash assumptions and be offended. I appreciate any comments on my opinion, but do not expect a change. Thank you :3