I don't know if I have depression 'cause I can still feel happy when I'm with my friends but I just inflicted harm on myself. I'm suicidal too. Is it ok?

NO IT IS NOT OKAY. Feeling suicidal is never okay. Do not wait to get help. Make an appointment with a psychiatrist in your area today!
NO. If you are suicidal, then you are not okay. You need to see someone asap, and call a suicide hot line.
Get help. There are a lot of ways to get help/care quickly. If you are feeling suicidal, you can seek care at your local emergency room as well. The doctors there will be able to quickly assess you and get you established with the psychiatric specialists who can help you. Good luck.
Not OK. National suicide prevention lifeline 1-800-273-talk (8255): you might feel ok surrounded by your friends, but what you're describing, doesn't seem like you're ok. Feelings of self-harm are never ok. Please find help --- go to the nearest emergency room or dial 911. They will do a complete eval at the er.