The present invention provides methods for limiting or preventing a decrease in the level of RyR2-bound FKBP12.6 in a subject. The present invention further provides methods for treating and preventing atrial and ventricular cardiac arrhythmias, heart failure, and exercise-induced sudden cardiac death in a subject. Additionally, the present invention provides use of JTV-519 in a method for limiting or preventing a decrease in the level of RyR2-bound FKBP12.6 in a subject who has, or is a candidate for, atrial fibrillation. Also provided are uses of 1,4-benzothiazepine derivatives in methods for treating and preventing atrial and ventricular cardiac arrhythmias and heart failure in a subject, and for preventing exercise-induced sudden cardiac death. The present invention also provides methods for identifying agents for use in treating and preventing atrial fibrillation and heart failure, and agents identified by these methods.