Hey man firstly good to see you survived it, it could have gone much worse. In a world and a comunity like this where you interact with divers and realize there are not that many of us its allways good to hear someone survived an incident and allways sad when someone doesnt.
Thank you also for sharing your story, its exactly the thing people need to hear just to realize once again that anything can happen out there. And even though it was a stupid mistake I can see that you learnt well from it.
So like Whopperhead said I hope you now use either a float or a reel, anything that can let you get away from the spear while enabling you to reach the survace safely. If your not using either of these then I suggest you rig that new gun of yours with something like this, do a search on floats or reels as I know there are loads of threads on here that covers the subject extensively.
Good luck and save diving mate

__________________
Dive safe and shoot straight
- Hénré -
------------------------------------------------------------------------------------------------------
"Thinking is the hardest work there is, which is probably why so few engage in it"
- Henry Ford -