No, neither a fleeting episode of depression nor a major depressive disorder are self-inflicted.
Let's start with major depressive disorders, herein, "depression."
The precise triggers for depression are not known, and it is generally recognized that there are multiple factors that can determine how at-risk a person is for developing a depression and how severely they will experience it. Generally though, people most at risk will have experienced some sort of life-changing trauma (eg, combat, sexual assault, debilitating injury) and/or have a history of depression in the family.
Mind you, these are just leading risk factors. Given the lack of understanding about the causes of depression, anybody is at risk.
People experiencing a serious episode of depression tend to experience a lack of control over their thoughts and moods and do not find gratification in activities which once or usually make them happy. This tends to lead them to withdraw from people and social situations, which further aggravates their depressed mood. "Forcing" someone who is depressed into social situations will usually only promote anxiety, exacerbating the depression. Furthermore, people who experience depression find it difficult to break from thought patterns that reinforce their moods. It isn't as simple as, "I would like to stop thinking these thoughts now," as depression tends to convince the sufferer that, in some way, they've deserved the condition.
This is generally why a combination of medication and behavioral therapy are required to help someone out of depression: medication to balance the bio-chemical response to depression and even out the person's mood, and therapy to help them break the cycle of negative thoughts and emotions and gradually make them more comfortable returning to normalized social patterns.
Very, very, very few people who have depression go out of their way to continue to be depressed (perhaps the occasional artist who gets inspired by dark moods, or some few who want to make a non-conformist statement... I guess), or to encourage the thoughts and triggers which promote depression. It is a horrible state to be in, and most people who experience it are gripped with the terrifying thought of, "What if I never get over this?" But the nature of depression, and the stigma attached to mental illness broadly, tends to serve as a barrier to seeking help, thus fueling the cycle.
So no, depression, as a mood disorder, is not self-inflicted. It can be brought on by trauma, medical history, or triggers that we don't yet understand; and people suffering from it by and large would like nothing more than to find a switch to turn it off.
Turning to depression as a transient mood that most people will experience at some point in their lives, this too is not self-inflicted.
Everybody will experience bad periods of time that will dampen their spirits. Nobody who is happy-go-lucky wakes up and decides, "I want to be sad for a little while." The overwhelming majority of these people will get over these periods in a matter of days and continue on with their routines. They might ruminate over the events which caused them to feel depressed, but not for long. It is perfectly fine and normal to experience temporary depressed moods; and most people will get through it without difficulty. Some, though, might lapse into a deeper depression and will need to seek help. It's not there fault though.