Many genetic factors play a role in increasing the risk of these diseases. So yes, depression can get inherited. It runs in the families and gets transmitted to off-springs of people with depression.