Having been in the ER twice for mental health, they're only there to "stabilize" you. You generally won't get crisis counciling or medication there, but they will almost definitely evaluate your mental health and suicide scale. If you prove you are actively suicidal with a plan, they'll send to a mental health hospital where you are further stabilized with medication, counciling, and basic activities.
Getting admitted for thoughts alone is difficult, and I've been told I wasn't qualified for inpatient because I wasn't actively suicidal or hurting myself, even though I had fresh SH marks.
If admitted, those hospitals are meant to keep you physically safe and away from crisis, and not intended to quickly recover from mental illness in a short period of time.
Should you not be in crisis, you can discuss this with your primary care physician who can refer you to the right person to help (therapist, psychiatrist, etc.). This depends on the country though.