Buddha said that all human beings are entitled to only two things: Suffering, and death.
You cannot actually prevent bad things from happening — all you can actually do is prepare for the outcome. The biggest source of suffering in the world is the arrogance that people can control the outcomes that they get and that other people get.
We often hear “If I work hard enough, I can get that job”, but that is wrong. People cannot control whether you get your job. While they should still work hard, they should be careful of having an expectation of the result. Too often, people get tied to the outcome of their actions and go crazy because they feel like they were in control. But they were not, and they blame themselves for that. They blame the people around them, as well as their circumstances.
You are only entitled to your actions, not to the fruits of those actions. The better you understand that you do not have control over the outcome, the more you will focus on the action. If you are stuck in a situation and not moving forward, realize that you do not control as much as you think you do — you only control yourself.
There is a difference between being depressed and being unhappy. People who are unhappy tend to say that they are depressed, but there is a difference between clinical depression and being unhappy.
An example of that would be the difference between being ill and having a life that has no meaning. Those are two different spectrums that are not related. Depression does not always mean being unhappy — sometimes people who are depressed are content.
There is also a difference between pain and suffering, therefore having no reason to live might be due to your life lacking meaning. While that is a problem, the solution to that problem is different from the solution to depression. Depression and unhappiness can be related but they do not have to be.
Buddha talked about Dukkha (suffering). Suffering is outside of the mind while within the mind we experience emotions like sadness. There is a difference between sadness and suffering. However, feeling pain is not limited to your physical condition, therefore you can also feel pain in your mind.
While the source of suffering is attachment, pain, and emotions are products of the mind. Attachment is rooted in the mind but suffering happens outside of the mind.
You can't avoid pain in life but you can do something about suffering. The way to end suffering is by cultivating detachment by focusing on your actions instead of their presumed outcomes. The result of cultivating detachment and living a detached life is living a life of fulfillment.
Suffering comes from attachment, while peace or contentment comes from detachment.
Attachment and expectation are related to results, so when you form an attachment, you also form an expectation. Detachment does not mean not caring about things — it implies having a lack of expectation.