Music can absolutely be used to treat depression. If listening to music can (even temporarily) put you into a better mood, then it has been therapeutic. More formally, there is a field called 'Music Therapy' in which people find some relief from their symptoms (of depression and other health challenges) through listening to or participating in the making of music. One major positive to this treatment as there is really no risk of side-effects (well, unless you don't like the music being played!) So try it out!
Actually music can relives the depressed person when it is liked much.