Ditide is a combination product that contains two medicines: benzthiazide and triamterene. It increases the production of urine and thus takes load off the heart.
Unfortunately both of them can result in high uric acid levels in the blood leading to pain in knee and ankle. In order to be sure, you should get your blood uric acid level checked. If it is high, then you will need to stop Ditide and take a single-ingredient product such as metolazone (brand name: Metolaz) 2.5mg tablet daily in the morning.
You will need to take long-acting penicillin injections for quite some time.