Well, if your computer can successfully connect to your PS4 controller, if you go to the options menu, and into controls (Where you can bind controls), you can go into the “Select Gamepad” option and select your PS4 controller. From there, you bind all the necessary buttons if they aren’t already pre-bind, look around in the rest of the options menu to make sure it’s to your liking (like Simple Controls, etc...) and you’re all set!
Now, this is considering that I don’t know if PS4 controllers normally can be detected by SRB2. If it doesn’t, then you’ll need to find a program that can register your controller as a regular gamepad that SRB2 can register.