Welcome to our forums and thanks for sharing what you are going through here. It's not easy to do and we're very grateful that you took this brave step. Please know you are in a safe, supportive place where others will be able to provide their insight and support. We are also reaching out to you privately to offer additional support.
It sounds like you are going through a difficult time with the urge to follow through with destructive behaviours. And it also sounds like there's a teacher that you possibly feel comfortable enough with to share this. We'd strongly encourage you to reach out and get the help you deserve and need. If you are sensing that this behaviour is getting harmful for you, then we'd urge you to listen to your intuition and get the right support.
Aside from talking to your teacher and maybe GP or a mental health professional, you can always reach out to our Support Service anytime at 1300 22 4636 or our friends at Lifeline at 13 11 14. These service also have webchats available if that's what you are more comfortable. We'd also strongly encourage you to reach out to Kids Helpline which supports young people at 1800 55 1800. They also have a 24/7 webchat service at: https://kidshelpline.com.au/get-help/webchat-counselling
Talking to a qualified, caring professional will help you clarify your situation and plan the next steps.
Please keep posting here to let us know how you're doing, whenever you feel up to it.