"Stomach issues", like acid reflux issues? If that is the case, I'd consider that problem more than the treatment you're taking for it. There is a link between stomach issues like GERD, and arrhythmia.
There is a possiblity for Bactrim (the antibiotic you are taking) to cause heart palpitations. If you are having heart palpitations accompanied by chest pain, it would probably be a good idea to call your doctor.