pulse sensor and ISR stops the rest of my code

Please reformat your code, to fix the indentation.
It's not obvious to me what your code does, too many if's and obscure variables.