It definitely can be anxiety related. Health anxiety can cause one to focus on all sorts of symptoms related to our bodies. Have you had it checked out by a doctor?
I suffer from panic and anxiety and believe me, I get all sorts of pains and aches in the chest area, from sharp to heart flutters. I think if you want to make sure you can always get a physical. You know a lot of anxiety has to do with how we think. If u get a physical you will at least know that you're ok and won't have to worry about the pains. I hope this helps. Take care.