Where is the pain exactly for you to say its the ulnar nerve? If its through the elbow joint where the 'funny bone' is (which is the nerve running through the cubital tunnel) then yes thats the ulnar nerve. I have had cubital tunnel syndrome which is an inflammation of the ulnar nerve for some time now, heavy benching and tricep extension movements like lying skull crushers are what triggers it.
I've found the following things have helped me:
1 - Lots of tricep stretching especially the long head of the tricep. When this gets bound up too much and the ligaments and tendons in the tricep are really taught, that's when the CTS tends to fire off.
2 - Scalenes: in the neck of all places i've found that these two muscles (front of neck about an inch and a half out from your cleft under the Adams Apple) get bound up and tight (and if you deadlift and squat heavy they do) then the elbow also fires off. Releasing these through ART or trigger point therapy can work wonders too.
3 - Getting deep tissue on abdominal cavity especially through obliques/intercostals etc. A bit esoteric but my musculo skeletal therapist has found a strong link between releasing mid section and the release of shoulder, pec and even upper leg issues.
4 - Rolling out tricep fascia - I get some PVC pipe and put it on the kitchen bench, I then bend my elbow and place palm of hand on forehead so its in stretch position. I then roll slowly through the space between the "horseshoe" of the tricep and the elbow, including the outer head of the triceps. I roll right around to the underside of the bicep and back again. I press deliberately hard down on the pipe to get good pressure.
5 - Anti inflammatory gel and tubular pressure bandaging: I do this before I press anything at training. Not always 100% but at least allows for some good movement.
6 - Nerve flossing: osteo thing, google that one mate it'll be easier than me trying to explain it.
7 - Stretching bicep tendons (youtube has some good videos on this) but if you've ever done the DC stretching its the palms down one and versions of it while holding a Barbell around shoulder height etc.
8 - Rolling out extensors in forearm. Same as tricep rolling but from the crook of the elbow where the 'blood test vein' is and through the meaty part of the forearm. I go right up to the elbow bones on that one too.
Its shit and can stick around for a while but if you get consistent with the above things I'm hopeful it'll help you too ...
Out.