Using music to uplift mood and alleviate depression
Is it ok to use music to induce positive states of mind, especially to
  uplift one's mood and alleviate depression?


Yes, if you are a layman and if you are not observing the 8 precepts.


  If music can be used to uplift one's mood, then why is it considered
  unwholesome and against the seventh precept?


'Uplifting' here means inducing pleasurable thoughts/feelings. Even Marjuana can do that. Some people eat sweets to uplift themselves. Uplifting doesn't mean wholesome. It's important to note that hearing music by chance does not break the precept. Listening intently breaks the precept.


  How does music cause attachment or craving?


Music is sound that is pleasurable. Wanting to hear pleasurable sounds is a sign of craving.