Discuss your symptoms with your doctor. Go to a de-adddiction center . It is really appreciated that you are willing to quit them and have tried on your own to quit also. So do not lose heart. Yu will get necessary support and help in qchieving this. YOu can quit them under supervision and constant monitoring such that the suicidal thoughts dont come back. Talk to the supprot groups too. They who have succesfully quitted these habits wwill be glad to help you out with their experiences and how they could overcome the difficulties.