Basically, there are criteria, called DSM criteria, for mental health conditions that are considered conditions. There are conditions in that diagnostic area that refer to dependence. It's usually called “substance use disorder”, but there are different variations.
Yes, it's considered an illness.