hi there, thanks for asking. Lorazepam
) is anti anxiety medication
but it should be taken for at most one month. As you mentioned it may cause dependency. When somebody has anxiety, she should tell her doctor to see what kind of anxiety she has and which medication is suitable for her. Some medications from the class of SSRI will probably help a lot and will not cause dependency. When anxiety is treated, insomnia
will be manageable with some methods like relaxation technics, bed restriction, stimulus control, etc that you can ask from your doctor about. Best wishes.