Control your breathing, do as best you can to calm yourself, and see if the feeling passes. If it doesn't change or gets worse, reach out to someone who will listen to you and help you until your symptoms improve. If you have someone who can stay with you and be with you in-person, ask them.
Remember, the feeling does pass eventually.
And, of course, if you feel like you're in imminent danger of attempting suicide, utilize the ER. It's not pleasant, but it's better than the alternative.