If you're trying to troubleshoot high CPU utilisation, then I think you're barking up the wrong tree. A google search on "high cpu sql server" will pull up this, among other things.
That said, you CAN limit ssms sessions with a logon trigger. You might want to modify the inner query to something like this:
SELECT
COUNT(*)
FROM
sys.dm_exec_sessions
WHERE
is_user_process = 1
AND program_name like 'Microsoft SQL Server Management Studio%'
AND login_name = system_user
I don't know that it's going to get you what you want, especially since you're ultimate goal is tuning CPU. The trigger will fire for every logon, which might use more processing power than the extra sessions you'd be preventing.
Also, I can't recommend hitting an already laggy production server with this. You could replay a profiler trace from prod on a dev copy with and without this change and see if there's any significant difference. But if I were you, I'd start looking for missing indexes.