Cardiac morbidity and mortality increases with the population age. To investigate the underlying pathological mechanisms, and suggest new ways to reduce clinical risks, computational approaches complementing experimental and clinical investigations are becoming more and more important. Here we explore the possible processes leading to the occasional onset and termination of the (usually) non-fatal arrhythmias widely observed in the heart. Using a computational model of a two-dimensional network of cardiac cells, we tested the hypothesis that an ischemia alters the properties of the gap junctions inside the ischemic area. In particular, in agreement with experimental findings, we assumed that an ischemic episode can alter the gap junctions of the affected cells by reducing their average conductance. We extended these changes to include random fluctuations with time, and modifications in the gap junction rectifying conductive properties of cells along the edges of the ischemic area. The results demonstrate how these alterations can qualitatively give an account of all the main types of non-fatal arrhythmia observed experimentally, and suggest how premature beats can be eliminated in three different ways: a) with a relatively small surgical procedure, b) with a pharmacological reduction of the rectifying conductive properties of the gap-junctions, and c) by pharmacologically decreasing the gap junction conductance. In conclusion, our model strongly supports the hypothesis that non-fatal arrhythmias can develop from post-ischemic alteration of the electrical connectivity in a relatively small area of the cardiac cell network, and suggests experimentally testable predictions on their possible treatments.