Yes I think it can be. There are some people who make endorphins that make you happy better than others. Some people might disagree but I have seen a genetic component to depression but there are lots of things in the environment too that can cause depression! Candace is the expert on this though!
I love Jenn’s answer and I will add to it. The science has shown that some genes are considered risk factors for genes. But, we have yet to find a single gene that codes for depression. Alternatively, we have found many genes and many pathways that lead to depression risk. Therefore, we considered depression a polygenetic disorder (as opposed to one gene coding for it, like Huntington’s).