Take a deep breath. Inhale. Exhale. It's all going to be okay!
As previous posters have said, you will not be locked in a psych hospital long term. That almost never happens nowadays. I encourage you to seek help, as you'll likely feel a bit better with treatment. Mental illness is nothing to be ashamed of, btw. If you have bipolar, or any other mental disorder, you have a legitimate medical condition. Would you avoid treatment if you were diabetic? No! It would be extraordinarily dangerous, perhaps even deadly. Bipolar disorder deserves the same medical attention.
If you are wondering whether or not you have the disorder, you can take the screening quiz here on psych central:
http://psychcentral.com/quizzes/bipolarquiz.htm You can also take the Mood Disorder Questionnaire:
http://www.dbsalliance.org/pdfs/MDQ.pdf
A score of 7 or above, a "yes" answer to the 2nd question, and an answer of at least "moderate problem" suggest a possible bipolar disorder.
There are many other psychiatric and medical conditions that can cause mood swings; among them are borderline personality disorder, ADHD, temporal lobe epilepsy, and multiple sclerosis. None of these potential alternate explanations are much friendlier than bipolar disorder, but like BP, most can be successfully treated.
I hope that you discover what ails you soon, so that you can find the appropriate treatment and start to feel better.