Talk to the doctor that prescribed them to you
Im not a doctor, but what you describe sounds like a rebound Tacicardia.
This occurs on the withdrawl of a beta blocker. You get a racing heart.
Often doctors wean you off a beta blocker. Its a slow process but it will eventually work.
I took Lebetholol for some time and after trying to stop, had to re start it as I had the same rebound you describe. I was taking 12 of them a day!! It was all ok as I reduced over a number of weeks, but when I stopped the last one, I was racing fast, so had to re start.
Im now at the stage of taking one every 2nd day.
Just sharing my experience with you. . .