I am based in Pakistan and I want to provide therapy for depression around the world using an app. I want the people around the world to use this app. Is it legal to provide online therapy in different countries?
This might be legal to do with patients in some places, but it is probably not legal to do in general, although it might be hard to enforce the laws prohibiting this conduct against a provider in Pakistan.
Different countries and sub-national governments regulate providing therapy differently. Some don't regulate it all, so you would only have to comply with the law of Pakistan on the subject, if any.
Other places require an occupational license to provide therapy, and in those case, the law of the place where the patient resides could apply that licensure requirement based upon where the patient resides, where the therapist is located when the service is provided, or by some other rules.
You would have to determine this on a jurisdiction by jurisdiction basis to be legal.
Many jurisdictions also have VAT or GST taxes that would apply to fees collected for therapy services provided to someone in their jurisdiction, and this would also be a compliance issue if there was fee for the therapy.
As a practical matter, you would also have to consider if there was any meaningful way that you could be punished for providing therapy services or not paying taxes in particular jurisdictions where some patients might reside or be receiving your app's services. If there was no meaningful remedy for violating those laws against your company in Pakistan, you might decide to ignore those laws because you could.