The symptoms clearly point out to a case of feline urinary tract infection. Your pet is avoiding the litter box thinking that it must be causing the painful discharge of urine (you observed the cat crying or screaming right?). Well, you got options to this end.
(1) go to the vet and most likely you'll get a prescription of pet antibiotics (the consultation would cost you though)
(2) try to reformulate your pet's diet--cat's are pure meat eaters and feeding them animal meat can resolve health issues; and
(3) use natural UTI treatments. Unlike pet antibiotics, pet standardized herbal remedies are a concoction of natural ingredients such as the Berberis Vulgaris (enhances bladder functions) Uva Ursi(restores PH levels in the urinary tract)and other homeopathic substances working naturally to heal symptoms, prevent its recurrence and encourage the healthy flow of urine...without the side effects of antibiotics.