I voted yes, but there is never a one only cause i think.
I have a strong family history of depression, I worked in a high risk profession for depression.
And things like hypos, strict and somewhat demeaning experiences in my teens as a diabetic and with past health professionals I am sure did not help.
The important things were:
not be too proud or stubborn about depression.
To realise that medication is helpful but not a complete panacea.
And that being able to talk things through from time to time with one or more fellow human beings, whether a professional, or in another occupation. way of life or experience is the most valuable thing of all.