I've been underweight/skinny my entire life (bulit like my dad) and I was also a picky eater as a kid AND a nervous child too, which gave me stomachaches which of course in turn affected my already light appetite. I'd also completely lose my appetite altogether when I was very stressed -- and I was often very stressed, so.... It was tough because I got made fun of for being skinny even as far back as 5th and 6th grades (ex. in 6th grade we were doing square dancing in gym class, and I still remember the boy I got paired up with loudly saying upon finding out I was his partner, "Oh great! I got the bag of bones!". That continued into high school where I was still anxious, depressed, stressed, and skinny and unpopular, and was given the lovely nickname "Bonz". :-/ sigh
Anyway, to directly answer the OP's question, yes... depression - and anxiety - definitely affect my appetite to where I'll barely eat anything for days, and I lose weight easily and quickly so I've been at least 15 lbs underweight for the past 20 years no matter how hard I try to eat or what I eat. I also have many physical health issues that impact my diet in terms of what I can eat and so that makes trying to gain weight even more of a challenge.
I hate it because I know I've always looked like a stick and even more so now after so many years of being physically ill and feeling nauseous 99.9% of the time, combined with my out of control anxiety and depression, and aging, all combining together to decrease my appetite or destroy it altogether.
[Incidentally, being skinny/underweight all my life has also made me DESPISE the phrase "Real women have curves!" OK whatever. Guess I'm just a scrawny, skinny, bony, depressed/anxiety-ridden fake woman! lol]
Oh and I find myself eating not the healthiest these days when I do eat, because due to the depression I just don't care enough anymore nor have the energy to make healthy, full meals even if I had the appetite for them. I know I need to eat more, and better, but I just am not usually able to, especially when I'm especially stressing out about something or my insomnia is very, very bad which it more often is than not these days.
Sorry so long. Weight is a touchy subject for me since it's always been an issue for me, and the stupid psyche docs like to use my weight as a handy excuse to blame all my issues on which frustates and infuriates me. Plus it sucks to want to gain weight but have so many GI issues yet the psyche docs keep yelling about how it's 'all anxiety' and even accused me of having an eating disorder. No, I'd love to eat, and eat more and eat lots of different things -- but when you have horrible nausea, intestinal cramps and other things happening every day almost 24/7, it's tough to have an appetite at all, let alone one that will allow for weight gain.