You need attention, we all do, some more than others. However, it's important to give and not just take. Otherwise, a person becomes an "emotional vampire" and will be avoided by others. Giving on the sole pretense of getting attention back isn't the same as caring about someone...not saying this is your situation at all.
Also, it's healthy to experience and accept loneliness for small periods. Being alone doesn't mean you have to be lonely.
Therapy helps. Good luck.