Thank you for the query.
Such symptom can be caused by some psychological problem like depression
or hormonal issue (like adrenals insufficiency). Frequent urinating can indicate urinary tract infection
at first. Please note that some foods contain a lot of water so if you eat lots of them, urine will be produced in increased amounts.
Also stomach issues like peptic ulcer
can give inability of eating.
For sure you should visit your doctor. Please start with general blood work, ions levels, thyroid tests and urine analysis.
Gastroscopy might be necessary as well as psychiatrist
Hope this will help.