Spontaneous depression and suicidal ideation can be caused by many things, the most often of which is chemical imbalances in the brain. Even if there is absolutely nothing wrong on both an objective and subjective scale, one might experience these effects. To remediate these feelings, attempt to find out if there was a tangible cause that made you feel this way. New job? Relationship? It could be something much less substantial as well, but tends to be something more. If a recent change has occurred, attempt to rewire your brain's chemistry by meditation and/or reward, or by seeking therapeutic regiments such as prayer or exercise. Avoid unhealthy habits like stress eating and binging on media.
Hope this helps