They are related on several levels.
Personality disorders typically involve symptoms of depression
but are classified otherwise. Depressed people tend to be pessimists, a personality trait. Although the terms are not correlated: depression is a neurobiological disorder; personality is an individual trait. Both are inherited, but most likely from different genes.