It really depends if the work was what actually did cause the attacks or not. Associating the panic attack with work is definitely going to make you more prone to having them when you are at work, even if work was not the cause. If you worked there for 12 years without incident, I see no reason why you can't go back and start fresh if you think you can do that.
Have you been getting any counseling or taking any medication? You should mention this change in your life to your psychiatrist or doctor and see if you need more guidance or something (possibly medications new or increased) to help stabilize you as you make a step forward.
Looking for another job may be very stressful and put you in a worse position than returning to a place where you are familiar with and worked comfortably (I assume) for 12 years.
If you need to go back to work, I think that you should at least try to go back. Staying home from work isn't productive and putting it off longer probably isn't going to help very much. A year is more than long enough to recuperate on a leave. If you still find yourself in a bad situation, then you can look to a different position or place of work.