The fact you do not have an episode during exercise does not rule out that mental
stress is causing or could cause a heart problem.
Stress can constrict vessels, etc. and as a consequence reduce oxygenated blood to the heart. If you have other symptoms that could be heart related, you may want to get checkup. But if you get away from the high stress environment thtat may be all that is necessary.