It will definitely help. It may even, dare I say, completely solve your problem. The only issue here is that clonazepam can take a while to "come on"... like 45 minutes to an hour. If you really want to eliminate the possibility of a panic attack, just take your prescribed dose, an hour or so prior to when you know you're gonna smoke. I, personally, would and do take 1mg for this purpose, and it works well.
Don't rely on klonopin to bring you out of a panic attack though, even taken sublingually, the panic attack will have mostly subsided by the time the drug is absorbed.