You did not fail.
Take this as a temporary mistake, keep your long term goal in focus.
You will only fail if you go back to smoking cigarettes right now. So dont smoke another cigarrete.
You cant control the past, yiou made a mistake in smoking a cigarrete. Just accept that and move on.
But remember that you can control whether you smoke another cugareete in five minutes, today or tommorow or the next week.
So decide not to. Take control of it because you can.
You can succeed.