Would would make him absolutely not fit to be president. I mean as well as been an attention seeking anti-vaccine religious nut job.
By this point I'd hope no-one is actually seriously thinking that Kanye could win, right?
However to answer your question, whilst it has been claimed that several Presidents have been diagnosed as as Biploar after they've left office or after their death (Teddy Roosevelt and John Adams) and that several others had various other mental illnesses, none have have had a confirmed mental illness "before" entering office. However there is nothing in the Constitution which specifically prevents it, in fact the Constitution is fairly wide open for who can become a president with no physical, mental, gender, race, religion or sexual preference requirements at all, only Citizenship and age -
----------------------------------------------------------------------------------------------
Article II, Section 1, Clause 5
“No Person except a natural born Citizen, or a Citizen of the United States, at the time of the Adoption of this Constitution, shall be eligible to the Office of President; neither shall any Person be eligible to that Office who shall not have attained to the Age of thirty five Years, and been fourteen Years a Resident within the United States.”
----------------------------------------------------------------------------------------------