Medical schools will never know your mental health history unless you reveal it to them. Provided you are stable and can complete med school without taking time off for further issues, there would be no bar to getting a license to practice medicine and get into a residency. In my state one must affirm every three years when renewing the state license that there is no psychological or physical health problem that would impair the ability to provide medical care. You might check on your own state's requirements in that respect. So go for it if your psychiatrist feels you can handle the stresses of med school and clinical training.
To be honest, medical is a crucible, and you really need your psychiatrist's assessment to see if you can handle the pressure. One of my students was dismissed because one day he decided to stop taking his meds, and quickly became psychotic.