You are having a problem of Fetishism. Fetishism is the sexual attraction to material and terrestrial objects (like panty in your case) while in reality the essence of the object is inanimate and sexless. You do have underlying Depression with obsessive thoughts. Please consult Psychiatrist nearby. Do not consider this just a habit, it’s Psychological Disorder which can be treated.